Total Complexity | 7 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package org.usfirst.frc.team3695.robot.commands; |
||
14 | public class CyborgCommandGoToMid extends Command { |
||
15 | |||
16 | Boolean isFinished; |
||
|
|||
17 | |||
18 | public CyborgCommandGoToMid() { |
||
19 | requires(Robot.SUB_MAST); |
||
20 | } |
||
21 | |||
22 | protected void initialize() { |
||
23 | DriverStation.reportWarning("MOVING TO MID POSITION", false); |
||
24 | isFinished = true; |
||
25 | } |
||
26 | |||
27 | protected void execute() { |
||
28 | if (!isFinished) { |
||
29 | isFinished = Robot.SUB_MAST.goToMiddle(); |
||
30 | } |
||
31 | } |
||
32 | |||
33 | protected boolean isFinished() { |
||
34 | DriverStation.reportWarning("AT MID POSITION", false); |
||
35 | return isFinished; |
||
36 | } |
||
37 | |||
38 | protected void end() {} |
||
39 | |||
40 | protected void interrupted() { |
||
41 | end(); |
||
42 | } |
||
44 |