Test Failed
Push — master ( d9c046...9db1c9 )
by John
04:04 queued 01:56
created

org.usfirst.frc.team3695.robot.commands.ButtonCommandKillCompressor   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A interrupted() 0 2 1
A execute() 0 1 1
A isFinished() 0 2 1
A initialize() 0 2 1
A end() 0 2 1
A ButtonCommandKillCompressor() 0 2 1
1
package org.usfirst.frc.team3695.robot.commands;
2
3
import org.usfirst.frc.team3695.robot.Robot;
4
5
import edu.wpi.first.wpilibj.command.Command;
6
7
/**
8
 * Code that kills compressor until interruption
9
 */
10
public class ButtonCommandKillCompressor extends Command {
11
12
    public ButtonCommandKillCompressor() {
13
        requires(Robot.SUB_COMPRESSOR);
14
    }
15
16
    protected void initialize() {
17
    	Robot.SUB_COMPRESSOR.setState(false);
18
    }
19
20
    protected void execute() {}
21
22
    protected boolean isFinished() {
23
        return false;
24
    }
25
26
    protected void end() {
27
    	Robot.SUB_COMPRESSOR.setState(true);
28
    }
29
30
    protected void interrupted() {
31
    	end();
32
    }
33
}
34