+package org.usfirst.frc3501.RiceCatRobot.commands;
+
+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);
+ }
+ }
+
+ protected void initialize() {
+ arm.initializeCounters();
+ }
+
+ protected void execute() {
+ }
+
+ protected boolean isFinished() {
+ return arm.isSwitch3Hit();
+ }
+
+ protected void end() {
+ System.out.println("Robot arm has reached level 3");
+ arm.stop();
+ }
+
+ protected void interrupted() {
+ end();
+ }
+}