Commit | Line | Data |
---|---|---|
7a25a687 E |
1 | package org.usfirst.frc3501.RiceCatRobot.commands; |
2 | ||
17f99e2c | 3 | import org.usfirst.frc3501.RiceCatRobot.Robot; |
7a25a687 E |
4 | |
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
7 | public class MoveArmToLevel2 extends Command { | |
7a25a687 E |
8 | double slowSpeed = 0.2; |
9 | public MoveArmToLevel2() { | |
17f99e2c E |
10 | if(Robot.arm.getArmSpeed() == 0.0) { |
11 | Robot.arm.setArmSpeeds(slowSpeed); | |
7a25a687 E |
12 | } |
13 | } | |
14 | ||
15 | protected void initialize() { | |
17f99e2c | 16 | Robot.arm.initializeCounters(); |
7a25a687 E |
17 | } |
18 | ||
19 | protected void execute() { | |
20 | } | |
21 | ||
22 | protected boolean isFinished() { | |
17f99e2c | 23 | return Robot.arm.isSwitch2Hit(); |
7a25a687 E |
24 | } |
25 | ||
26 | protected void end() { | |
27 | System.out.println("Robot arm has reached level 2"); | |
28 | } | |
29 | ||
30 | protected void interrupted() { | |
31 | end(); | |
32 | } | |
33 | } |