Skip to content

Commit 2e85028

Browse files
authored
Changes during drive practice (#132)
* A few tweaks * spotless
1 parent ee003d8 commit 2e85028

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

src/main/java/frc/lib/Util.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ public static Color allianceToColor(Alliance alliance) {
1414
return alliance == Alliance.Blue ? Color.kBlue : Color.kRed;
1515
}
1616

17+
/**
18+
* Returns true if the numbners are within floating point precision
19+
*
20+
* @param a first value
21+
* @param b second value
22+
* @return true iff a and b are effectively equal
23+
*/
1724
public static boolean nearlyEqual(double a, double b) {
1825
return Math.abs(a - b) < Math.ulp(1);
1926
}

src/main/java/frc/robot/LEDs/LEDs.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,17 +503,13 @@ public void execute() {
503503
}
504504

505505
public static AddressableLEDBufferView[] intakeBuffers = {
506-
// leftStrip,
507-
// rightStrip
508506
Segments.leftTop.bufferView.reversed(),
509507
Segments.rightTop.bufferView.reversed(),
510508
Segments.leftBottom.bufferView,
511509
Segments.rightBottom.bufferView
512510
};
513511

514512
public static AddressableLEDBufferView[] outtakeBuffers = {
515-
// leftStrip.reversed(),
516-
// rightStrip.reversed()
517513
Segments.leftTop.bufferView,
518514
Segments.rightTop.bufferView,
519515
Segments.leftBottom.bufferView.reversed(),

src/main/java/frc/robot/Robot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ private void configureDriverButtonBindings() {
280280
var outtaking = driver.HIn();
281281
lifter.atProcessorHeight.and(outtaking)
282282
.whileTrue(algaeRoller.createOuttakeToProcessorCommand());
283-
lifter.atBargeHeight.and(outtaking)
283+
lifter.atProcessorHeight.negate().and(outtaking)
284284
.whileTrue(algaeRoller.createOuttakeToBargeCommand());
285285
outtaking
286286
.whileTrue(coralRoller.createOuttakeCommand());
@@ -460,7 +460,7 @@ protected Command createRollerAnimationCommand() {
460460
*/
461461
BooleanSupplier intakeSupplier =
462462
() -> {
463-
return coralRoller.getRollerVelocity() > 0 || algaeRoller.getRollerVelocity() > 0;
463+
return coralRoller.getRollerVelocity() > 1 || algaeRoller.getRollerVelocity() > 1;
464464
};
465465

466466
/*

src/main/java/frc/robot/elevator/ElevatorConstants.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ public static enum CoralWristState {
155155
L1(125),
156156
L2(65),
157157
L3(65),
158-
L4(35),
158+
// TODO: reevaluate
159+
L4(30),
159160
Intake(125),
160161
AlgaeMode(90);
161162

@@ -242,7 +243,8 @@ public static enum AlgaeWristState {
242243
Processor(0),
243244
L2(-5),
244245
L3(-5),
245-
Barge(60),
246+
// TODO: reevaluate
247+
Barge(55),
246248
CoralMode(80);
247249

248250
public Angle angle;

0 commit comments

Comments
 (0)