interrupted
last analyzed

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 2
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import edu.wpi.first.wpilibj.command.Command;
4
import org.usfirst.frc.team3695.robot.Robot;
5
6
/** toggles the state of the clamp */
7
public class ToggleCommandReverse extends Command {
8
9
    boolean isFinished;
0 ignored issues
show
Comprehensibility introduced by
Fields and methods should not have conflicting names like isFinished. While this is technically legal it can lead to misunderstandings and problems with serialization.
Loading history...
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
    }
31
}
32