Uses arrays and sends message when a specific limitswitch is hit
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / MoveArmToLevel3.java
CommitLineData
7a25a687
E
1package org.usfirst.frc3501.RiceCatRobot.commands;
2
3import org.usfirst.frc3501.RiceCatRobot.subsystems.Arm;
4
5import edu.wpi.first.wpilibj.command.Command;
6
7public class MoveArmToLevel3 extends Command {
8 Arm arm;
9
10 double slowSpeed = 0.2;
11
12 public MoveArmToLevel3() {
13 if (arm.getArmSpeed() == 0.0) {
14 arm.setArmSpeeds(slowSpeed);
15 }
16 }
17
18 protected void initialize() {
19 arm.initializeCounters();
20 }
21
22 protected void execute() {
23 }
24
25 protected boolean isFinished() {
26 return arm.isSwitch3Hit();
27 }
28
29 protected void end() {
30 System.out.println("Robot arm has reached level 3");
31 arm.stop();
32 }
33
34 protected void interrupted() {
35 end();
36 }
37}