add command to robot.java to actually run the LimitSwitchTest
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / MoveArmToLevel3.java
index d969deec78bfebceb0a5929cfc7760f0043fa6b2..fbbf32a503d37d036f41dbd615c1cab8c5b83fcf 100644 (file)
@@ -1,34 +1,34 @@
 package org.usfirst.frc3501.RiceCatRobot.commands;
 
+import org.usfirst.frc3501.RiceCatRobot.Robot;
 import org.usfirst.frc3501.RiceCatRobot.subsystems.Arm;
 
 import edu.wpi.first.wpilibj.command.Command;
 
 public class MoveArmToLevel3 extends Command {
-       Arm arm;
 
        double slowSpeed = 0.2;
 
        public MoveArmToLevel3() {
-               if (arm.getArmSpeed() == 0.0) {
-                       arm.setArmSpeeds(slowSpeed);
+               if (Robot.arm.getArmSpeed() == 0.0) {
+                       Robot.arm.setArmSpeeds(slowSpeed);
                }
        }
 
        protected void initialize() {
-               arm.initializeCounters();
+               Robot.arm.initializeCounters();
        }
 
        protected void execute() {
        }
 
        protected boolean isFinished() {
-               return arm.isSwitch3Hit();
+               return Robot.arm.isSwitch3Hit();
        }
 
        protected void end() {
                System.out.println("Robot arm has reached level 3");
-               arm.stop();
+               Robot.arm.stop();
        }
 
        protected void interrupted() {