implement ShootAtHighGoal and add some helper methods
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / shooter / ResetCatapult.java
index ecdfce6ebf762120c56b4927d3a62337fadd937b..3c46bf4dfcf757e1e651bdf7a665d49822e6a458 100644 (file)
@@ -1,5 +1,6 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Constants;
 import org.usfirst.frc.team3501.robot.Robot;
 
 import edu.wpi.first.wpilibj.command.Command;
@@ -12,7 +13,9 @@ public class ResetCatapult extends Command {
 
   @Override
   protected void initialize() {
-    Robot.shooter.resetCatapult();
+    if (Robot.shooter.getCatapult1State() == Constants.Shooter.SHOOT
+        || Robot.shooter.getCatapult2State() == Constants.Shooter.SHOOT)
+      Robot.shooter.resetCatapult();
   }
 
   @Override