File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -248,10 +248,13 @@ private void configureDriverButtonBindings() {
248
248
.whileTrue (new DriveToPoseCommand (swerve , vision , () -> swerve .getNearestPose ()));
249
249
250
250
// Outtake grippers
251
- driver .HIn ()
252
- .whileTrue (coralRoller .createOuttakeCommand ()
253
- .alongWith (algaeRoller .createOuttakeCommand ()));
254
-
251
+ var outtaking = driver .HIn ();
252
+ lifter .atProcessorHeight .and (outtaking )
253
+ .whileTrue (algaeRoller .createOuttakeToProcessorCommand ());
254
+ lifter .atBargeHeight .and (outtaking )
255
+ .whileTrue (algaeRoller .createOuttakeToBargeCommand ());
256
+ outtaking
257
+ .whileTrue (coralRoller .createOuttakeCommand ());
255
258
}
256
259
257
260
private void configureOperatorButtonBindings () {
Original file line number Diff line number Diff line change @@ -89,8 +89,12 @@ public Command createIntakeCommand() {
89
89
return this .run (() -> setVoltage (AlgaeRollerConstants .kIntakeVoltage ));
90
90
}
91
91
92
- public Command createOuttakeCommand () {
93
- return this .run (() -> setVoltage (AlgaeRollerConstants .kOuttakeVoltage ));
92
+ public Command createOuttakeToBargeCommand () {
93
+ return this .run (() -> setVoltage (AlgaeRollerConstants .kOuttakeToBargeVoltage ));
94
+ }
95
+
96
+ public Command createOuttakeToProcessorCommand () {
97
+ return this .run (() -> setVoltage (AlgaeRollerConstants .kOuttakeToProcessorVoltage ));
94
98
}
95
99
96
100
public Command createHoldAlgaeCommand () {
Original file line number Diff line number Diff line change @@ -185,7 +185,8 @@ public static final class AlgaeRollerConstants {
185
185
public static final Voltage kIntakeVoltage = Volts .of (5.0 );
186
186
// Found 3/9/2025 that 5V applied at stall will draw ~5A, which is acceptable for motor lifetime
187
187
public static final Voltage kHoldVoltage = Volts .of (5.0 );
188
- public static final Voltage kOuttakeVoltage = kIntakeVoltage .unaryMinus ();
188
+ public static final Voltage kOuttakeToProcessorVoltage = Volts .of (-5.0 );
189
+ public static final Voltage kOuttakeToBargeVoltage = Volts .of (-2.5 );
189
190
}
190
191
191
192
public static final class AlgaeWristConstants {
Original file line number Diff line number Diff line change @@ -154,6 +154,8 @@ public Boolean inState(LifterState state) {
154
154
}
155
155
156
156
public Trigger atIntakingHeight = new Trigger (() -> inState (LifterState .CoralIntake ));
157
+ public Trigger atProcessorHeight = new Trigger (() -> inState (LifterState .AlgaeProcessor ));
158
+ public Trigger atBargeHeight = new Trigger (() -> inState (LifterState .AlgaeBarge ));
157
159
public Trigger atFloorIntakingHeight = new Trigger (() -> inState (LifterState .AlgaeIntakeFloor ));
158
160
public Trigger tooHighForCoralWrist =
159
161
new Trigger (() -> getCurrentHeight ().gt (LifterState .CoralL3 .height .plus (Inches .of (2.0 ))));
You can’t perform that action at this time.
0 commit comments