Implement some methods of RunFlyWheelContinuous class
authorshainachen <shaina.sierra@gmail.com>
Sat, 14 Jan 2017 23:41:36 +0000 (15:41 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Wed, 25 Jan 2017 03:40:38 +0000 (19:40 -0800)
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