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

interrupted()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 2
rs 10
cc 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