手动完成版(待测试)

This commit is contained in:
OnDYCLaptop
2026-03-03 12:37:50 +08:00
parent 85c7cb9fb3
commit fd4fb39a50
8 changed files with 96 additions and 30 deletions
@@ -10,13 +10,13 @@ import frc.robot.Constants;
public class IntakerControls {
private final IntakerSubsystem intakerSubsystem;
private final IntakerSubsystem IntakerSubsystem;
private final CommandXboxController controller;
private static final double ROTATER_STEP_PER_CYCLE = 0.00; // 需要你按实际速度调:越大越快(fromAI)
private static final double ROTATER_STEP_PER_CYCLE = 0.00;
public IntakerControls(IntakerSubsystem intakerSubsystem, CommandXboxController controller) {
this.intakerSubsystem = intakerSubsystem;
public IntakerControls(IntakerSubsystem Intaker, CommandXboxController controller) {
this.IntakerSubsystem = Intaker;
this.controller = controller;
}
@@ -73,8 +73,18 @@ public class IntakerControls {
if (controller.getLeftTriggerAxis() < 0.1) {
getterspeed = 0;
}
intakerSubsystem.setIntakerGetterSpeed(getterspeed);
}, intakerSubsystem);
IntakerSubsystem.setIntakerGetterSpeed(getterspeed);
if(controller.getLeftY() < -0.5){
IntakerSubsystem.IntakerDownNonStop();
} else if(controller.getLeftY() > 0.5){
IntakerSubsystem.IntakerUpNonStop();
} else {
IntakerSubsystem.stopIntakerotater();
}
}, IntakerSubsystem);
}
}
public Command resetIntakerRotaterEncoderCommand(IntakerSubsystem intakerSubsystem) {
return Commands.runOnce(intakerSubsystem::zeroEncoder, intakerSubsystem);
}
}