| Total Complexity | 6 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package org.usfirst.frc.team3695.robot.commands; |
||
| 7 | public class ToggleCommandReverse extends Command {
|
||
| 8 | |||
| 9 | boolean isFinished; |
||
|
|
|||
| 10 | public ToggleCommandReverse() {
|
||
| 11 | requires(Robot.SUB_DRIVE); |
||
| 12 | isFinished = false; |
||
| 13 | } |
||
| 14 | |||
| 15 | protected void initialize() {}
|
||
| 16 | |||
| 17 | protected void execute() {
|
||
| 18 | Robot.SUB_DRIVE.toggleReversing(); |
||
| 19 | isFinished = true; |
||
| 20 | } |
||
| 21 | |||
| 22 | protected boolean isFinished() { return isFinished; }
|
||
| 23 | |||
| 24 | protected void end() {
|
||
| 25 | isFinished = false; |
||
| 26 | } |
||
| 27 | |||
| 28 | protected void interrupted() {
|
||
| 29 | end(); |
||
| 30 | } |
||
| 32 |