manipulator retract in controls

This commit is contained in:
Tylr-J42 2025-02-28 10:32:00 -05:00
parent 92206fa252
commit e0d0a121ba
2 changed files with 3 additions and 3 deletions

View File

@ -143,7 +143,7 @@ public class RobotContainer {
);
driver.leftTrigger().whileTrue(
manipulator.runUntilCollected(() -> 0.75)
manipulator.runUntilCollected(() -> 0.75).andThen(manipulator.retractCommand(() -> 0.25))
);
driver.start().and(driver.back()).onTrue(

View File

@ -74,9 +74,9 @@ public class Manipulator extends SubsystemBase {
}).until(() -> !coralBeamBreak.get());
}
public Command retractCommand(DoubleSupplier speed){
public Command retractCommand(DoubleSupplier retractSpeed){
return run(() -> {
manipulatorMotor.set(-speed.getAsDouble());
manipulatorMotor.set(-retractSpeed.getAsDouble());
}
).until(() -> coralBeamBreak.get());
}