This commit is contained in:
aarav18
2022-03-18 19:29:55 -06:00
parent b755f19de0
commit 33dc1ea3cb
2 changed files with 8 additions and 8 deletions
@@ -155,8 +155,8 @@ public class RobotContainer {
public static boolean softLimits = true; public static boolean softLimits = true;
// control mode switching // control mode switching
public static enum ControlMode { SHOOTER, CLIMBER }; private enum ControlMode { SHOOTER, CLIMBER };
public static ControlMode currentControlMode = ControlMode.SHOOTER; private ControlMode currentControlMode = ControlMode.SHOOTER;
// turret mode switching // turret mode switching
private enum TurretMode { MANUAL, AUTONOMOUS }; private enum TurretMode { MANUAL, AUTONOMOUS };
@@ -45,12 +45,12 @@ public class RunTurretOrClimberAuto extends CommandBase {
@Override @Override
public void execute() { public void execute() {
// check control mode here. if shooter control mode, run turret auto command. if climber control mode, run climber auto command. // check control mode here. if shooter control mode, run turret auto command. if climber control mode, run climber auto command.
if (RobotContainer.currentControlMode.equals(RobotContainer.ControlMode.SHOOTER)) { // if (RobotContainer.currentControlMode.equals(RobotContainer.ControlMode.SHOOTER)) {
new AimToCenter(this.turret, this.swerveDrive, this.visionOdometry); // new AimToCenter(this.turret, this.swerveDrive, this.visionOdometry);
} // }
if (RobotContainer.currentControlMode.equals(RobotContainer.ControlMode.CLIMBER)) { // if (RobotContainer.currentControlMode.equals(RobotContainer.ControlMode.CLIMBER)) {
new RunClimberPath(this.climber, this.claws, new Point[] {new Point()}); // new RunClimberPath(this.climber, this.claws, new Point[] {new Point()});
} // }
} }
// Called once the command ends or is interrupted. // Called once the command ends or is interrupted.