@@ -21,7 +21,7 @@ public static enum Position {
2121 private Flywheel subsystem ;
2222 private Position pose ;
2323 private CommandSwerveDrivetrain drivetrain ;
24- public static String isOn = "" ;
24+ public static String flywheelState = "Stopped " ;
2525
2626 public FlywheelCommand (Flywheel subsystem , Position pose , CommandSwerveDrivetrain drivetrain ) {
2727 this .pose = pose ;
@@ -37,34 +37,25 @@ public void execute() {
3737 // Spins flywheels at proper speed for shooting from hub
3838 case HUB_SHOT :
3939 subsystem .shoot (FlywheelConfig .FLYWHEEL_HUB_SHOT_SPEED );
40- isOn = "true" ;
41- // System.out.println("Flywheel: Hub Shot");
40+ flywheelState = "Hub Shot" ;
4241 break ;
4342
4443 // Spins flywheels at proper speed for shooting from tower
4544 case TOWER_SHOT :
4645 subsystem .shoot (FlywheelConfig .FLYWHEEL_TOWER_SHOT_SPEED );
47- isOn = "true" ;
48-
49- // System.out.println("Flywheel: Tower Shot");
46+ flywheelState = "Tower Shot" ;
5047 break ;
5148
5249 case TRENCH_SHOT :
5350 subsystem .shoot (FlywheelConfig .FLYWHEEL_TRENCH_SHOT_SPEED );
54- isOn = "true" ;
55-
56- // System.out.println("Flywheel: Trench Shot");
51+ flywheelState = "Trench Shot" ;
5752 break ;
5853
5954 // Spins flywheels at estimated speed given distance from hub
6055 case CALCULATED_SHOT :
61- isOn = "true " ;
56+ flywheelState = "Calculated Shot " ;
6257 subsystem .shoot (
6358 ShotCalculator .calculateFlywheelShot (drivetrain .getState ().Pose .getTranslation ()));
64- System .out .println (
65- "Flywheel: Calculated Shot"
66- + ShotCalculator .calculateFlywheelShot (
67- drivetrain .getState ().Pose .getTranslation ()));
6859 break ;
6960
7061 // Determines if robot should be prepared to shoot (if during active period or 5 seconds
@@ -74,13 +65,13 @@ public void execute() {
7465 subsystem .shoot (
7566 ShotCalculator .calculateFlywheelDefaultShot (
7667 drivetrain .getState ().Pose .getTranslation ()));
77- // System.out.println("Flywheel: Default Shot") ;
68+ flywheelState = " Default Shot" ;
7869 break ;
7970
8071 // Runs flywheels in outtake direction in case of jam
8172 case OUTTAKE :
8273 subsystem .outtake (FlywheelConfig .FLYWHEEL_OUTTAKE_SPEED );
83- // System.out.println("Flywheel: Outtake") ;
74+ flywheelState = " Outtake" ;
8475 break ;
8576
8677 default :
@@ -91,7 +82,7 @@ public void execute() {
9182 @ Override
9283 public void end (boolean interrupted ) {
9384 subsystem .stop ();
94- isOn = "false " ;
85+ flywheelState = "none " ;
9586 }
9687
9788 @ Override
0 commit comments