Skip to content

Commit d128136

Browse files
committed
Added slower reverse indexer to allow manual jostling
1 parent 447d2a9 commit d128136

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/main/java/frc/robot/RobotContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,8 @@ private void configureBindings()
276276
otherbuttonbox.button(2).whileTrue(shooterMotorSubsystem.SpinStop());
277277
otherbuttonbox.button(3).whileTrue(shooterMotorSubsystem.ForwordSlowSpin(.9));
278278
otherbuttonbox.button(4).whileTrue(indexer.StopSpin());
279+
otherbuttonbox.button(5).whileTrue(indexer.BackwardSlowSpin());
280+
279281

280282
driverXbox.b().whileTrue(indexer.StopSpin());
281283
driverXbox.rightTrigger().whileTrue(intakeSubsystem.goToPositionCommand(0));

src/main/java/frc/robot/subsystems/IndexerSubsystem.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,25 @@ public void runDutyCycleMotor(double speed){
5757
// Change your command methods to use runEnd
5858
public Command ForwordSpin() {
5959
return this.runOnce(
60-
() -> runDutyCycleMotor(IndexerConstants.SINGLE_MOTOR_SPEED) // Run at 50% speed while held
60+
() -> runDutyCycleMotor(IndexerConstants.SINGLE_MOTOR_SPEED)
61+
);
62+
}
63+
64+
public Command BackwardSlowSpin() {
65+
return this.runOnce(
66+
() -> runDutyCycleMotor(IndexerConstants.SINGLE_MOTOR_SLOW_SPEED)
6167
);
6268
}
6369

6470
public Command BackwardSpin() {
6571
return this.runOnce(
66-
() -> runDutyCycleMotor(-IndexerConstants.SINGLE_MOTOR_SPEED)// Run reverse while held
72+
() -> runDutyCycleMotor(-IndexerConstants.SINGLE_MOTOR_SPEED)
6773
);
6874
}
6975

7076
public Command StopSpin() {
7177
return this.runOnce(
72-
() -> runDutyCycleMotor(0)// Run reverse while held
78+
() -> runDutyCycleMotor(0)
7379
);
7480
}
7581
// public Command BackwardSlowSpin() {

0 commit comments

Comments
 (0)