Uses arrays and sends message when a specific limitswitch is hit
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / MoveArmToLevel1.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 MoveArmToLevel1 extends Command {
8 Arm arm;
9 double slowSpeed = 0.2;
10
11 public MoveArmToLevel1() {
12 arm.setArmSpeeds(slowSpeed);
13 }
14
15 protected void initialize() {
16 arm.initializeCounters();
17 }
18
19 protected void execute() {
20 }
21
22 protected boolean isFinished() {
23 return arm.isSwitch1Hit();
24 }
25
26 protected void end() {
27 System.out.println("Robot arm has reached level 1");
28 }
29
30 protected void interrupted() {
31 end();
32 }
33}