Completed
Push — master ( 74c8db...6c2084 )
by John
33s
created

interrupted()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
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 ButtonCommandDock extends Command {
8
9
    public ButtonCommandDock() {
10
        requires(Robot.SUB_DRIVE);
11
    }
12
13
    protected void initialize() {
14
        Robot.SUB_DRIVE.isDocking(true, 0.5d);
0 ignored issues
show
Comprehensibility introduced by
Consider assigning this magic number 0.5d to a constant.

Using constants for hard-coded numbers is a best practice. A constant’s name can explain the rationale behind this magic number. It is also easier to find if you ever need to change it.

Loading history...
15
    }
16
17
    protected void execute() {}
18
19
    protected boolean isFinished() { return false; }
20
21
    protected void end() {
22
        Robot.SUB_DRIVE.isDocking(false, 0.5d);
0 ignored issues
show
Comprehensibility introduced by
Consider assigning this magic number 0.5d to a constant.

Using constants for hard-coded numbers is a best practice. A constant’s name can explain the rationale behind this magic number. It is also easier to find if you ever need to change it.

Loading history...
23
    }
24
25
    protected void interrupted() {
26
        end();
27
    }
28
}
29