Implement some methods of RunFlyWheelContinuous class
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / shooter / RunIndexWheelContinuous.java
index 6f306f85e97bea7f37474f4770753b2a35affade..aa2dbb26dd95c7a2717312909faeb69551ea4d64 100644 (file)
@@ -1,5 +1,7 @@
 package org.usfirst.frc.team3501.robot.commands.shooter;
 
+import org.usfirst.frc.team3501.robot.Robot;
+
 import edu.wpi.first.wpilibj.command.Command;
 
 /**
@@ -27,6 +29,7 @@ public class RunIndexWheelContinuous extends Command {
   // Called just before this Command runs the first time
   @Override
   protected void initialize() {
+    Robot.getShooter().setIndexWheelMotorVal(motorVal);
   }
 
   // Called repeatedly when this Command is scheduled to run
@@ -37,12 +40,14 @@ public class RunIndexWheelContinuous extends Command {
   // Called once after isFinished returns true
   @Override
   protected void end() {
+    Robot.getShooter().stopIndexWheel();
   }
 
   // Called when another command which requires one or more of the same
   // subsystems is scheduled to run
   @Override
   protected void interrupted() {
+    end();
   }
 
   @Override