Fix code changes
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / ToggleIndexerPiston.java
index 42cf3bcbef392aaaf9642656e809d9bc69cf042a..4b1f09c0698d9714049a5a1cff1330b2cacc5ba7 100644 (file)
@@ -27,11 +27,12 @@ public class ToggleIndexerPiston extends Command {
   // Called repeatedly when this Command is scheduled to run
   @Override
   protected void execute() {
-    if (Shooter.getShooter().getPistonValue() == Constants.Shooter.LOW_GEAR) {
-      Shooter.getShooter().setHighGear();
+    if (shooter.getPistonValue() == Constants.Shooter.LOW_GEAR) {
+      shooter.setHighGear();
     } else {
-      Shooter.getShooter().setLowGear();
+      shooter.setLowGear();
     }
+
   }
 
   // Called once after isFinished returns true
@@ -48,7 +49,7 @@ public class ToggleIndexerPiston extends Command {
 
   @Override
   protected boolean isFinished() {
-    return false;
+    return true;
 
   }