若自动爬升 则手动阶段自动让钩子下降(待测试

This commit is contained in:
OnDYCLaptop
2026-03-10 16:30:07 +08:00
parent 8b70832978
commit 50c9af952c
4 changed files with 43 additions and 8 deletions
@@ -70,6 +70,7 @@ public class RobotContainer {
private final SendableChooser<Command> autoChooser;
private final Trigger enableTrigger = new Trigger(DriverStation::isEnabled);
private final Trigger teleopStartTrigger = new Trigger(DriverStation::isTeleopEnabled);
public RobotContainer() {
@@ -90,6 +91,7 @@ public class RobotContainer {
configueClimber();
bingdingLED();
configueIntaker();
configureBindings();
}
/* ====================== */
@@ -200,4 +202,21 @@ public class RobotContainer {
controllerupper.a().onTrue(intakerControls.resetIntakerRotaterEncoderCommand(IntakerSubsystem));
}
private void configureBindings() {
teleopStartTrigger.onTrue(handleClimberAtTeleopStartCommand());
}
private Command handleClimberAtTeleopStartCommand() {
return new InstantCommand(() -> {
if (climberSubsystem.wasAutoClimbUsedInAuto()) {
climberSubsystem.climbUp();
climberSubsystem.clearAutoClimbUsedInAutoFlag();
}
}, climberSubsystem);
}
public ClimberSubsystem getClimberSubsystem() {
return climberSubsystem;
}
}