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

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
@@ -56,13 +56,17 @@ import frc.robot.Constants.RobotStatus;
}, climber));
}
public static Command climb_down(ClimberSubsystem climber) {
return new RunCommand(() -> {
climber.climbDownAuto(); // 控制爬升器下降
}, climber).withTimeout(2.0) //
.andThen(new InstantCommand(() -> {
climber.holdPosition(); // 停止并锁定当前爬升器位置
}, climber));
return Commands.sequence(
new InstantCommand(climber::markAutoClimbUsedInAuto),
new RunCommand(() -> {
climber.climbDownAuto();
}, climber).withTimeout(2.0),
new InstantCommand(() -> {
climber.holdPosition();
}, climber)
);
}
public static Command start_intake(IntakerSubsystem intaker) {
return new RunCommand(() -> {
intaker.setIntakerGetterSpeed(Constants.Intaker.IntakeGetterSpeedforAuto); // 启动吸球