| Total Complexity | 6 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package org.usfirst.frc.team3695.robot.commands; |
||
| 12 | public class ButtonCommandHitTheDeck extends Command {
|
||
| 13 | |||
| 14 | Boolean isFinished; |
||
|
|
|||
| 15 | |||
| 16 | long startTime; |
||
| 17 | |||
| 18 | public ButtonCommandHitTheDeck() {
|
||
| 19 | requires(Robot.SUB_MAST); |
||
| 20 | } |
||
| 21 | |||
| 22 | protected void initialize() {
|
||
| 23 | isFinished = false; |
||
| 24 | startTime = System.currentTimeMillis(); |
||
| 25 | } |
||
| 26 | |||
| 27 | protected void execute() {
|
||
| 28 | isFinished = Robot.SUB_MAST.dropIt(Util.getAndSetDouble("Drop Speed", .5)) || (startTime + Constants.MAST_TIMEOUT >= System.currentTimeMillis());
|
||
| 29 | } |
||
| 30 | |||
| 31 | protected boolean isFinished() { return isFinished; }
|
||
| 32 | |||
| 33 | protected void end() {
|
||
| 34 | } |
||
| 35 | |||
| 36 | protected void interrupted() {}
|
||
| 37 | } |
||
| 38 |