org.usfirst.frc.team3695.robot.commands.ToggleCommandClamp   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A end() 0 2 1
A ToggleCommandClamp() 0 2 1
A execute() 0 1 1
A isFinished() 0 1 1
A interrupted() 0 2 1
A initialize() 0 2 1
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 ToggleCommandClamp extends Command {
8
	
9
    public ToggleCommandClamp() {
10
        requires(Robot.SUB_CLAMP);
11
    }
12
13
    protected void initialize() {
14
    	Robot.SUB_CLAMP.closeArms();
15
    }
16
17
    protected void execute() {}
18
19
    protected boolean isFinished() { return false; }
20
21
    protected void end() {
22
    	Robot.SUB_CLAMP.openArms();
23
    }
24
25
    protected void interrupted() {
26
    	end();
27
    }
28
}
29