manipulator retract in controls

This commit is contained in:
Tyler-J42 committed 2025-02-28 10:32:00 -05:00
1 parent 92206fa252
commit e0d0a121ba
2 files changed
+3 -3

No files matched your search

+1 -1
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(
@@ -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());
}