Total Complexity | 10 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | package org.usfirst.frc.team3695.robot.commands; |
||
8 | public class CyborgCommandRaiseToPosition extends Command { |
||
9 | |||
10 | private Mast position; |
||
11 | |||
12 | public CyborgCommandRaiseToPosition(Mast position) { |
||
13 | requires(Robot.SUB_MAST); |
||
14 | this.position = position; |
||
15 | } |
||
16 | |||
17 | protected boolean isFinished() { return false; } |
||
18 | |||
19 | protected void initialize() {} |
||
20 | |||
21 | protected void execute() { |
||
22 | switch (position){ |
||
23 | case PINION_UP: |
||
24 | Robot.SUB_MAST.adjustPinion(Position.UP); |
||
25 | break; |
||
26 | case PINION_DOWN: |
||
27 | Robot.SUB_MAST.adjustPinion(Position.DOWN); |
||
28 | break; |
||
29 | case SCREW_UP: |
||
30 | Robot.SUB_MAST.adjustScrew(Position.UP); |
||
31 | break; |
||
32 | case SCREW_DOWN: |
||
33 | Robot.SUB_MAST.adjustScrew(Position.DOWN); |
||
34 | break; |
||
35 | } |
||
36 | } |
||
37 | |||
38 | protected void end() {} |
||
39 | |||
40 | protected void interrupted() { |
||
41 | end(); |
||
42 | } |
||
44 |