Test Failed
Push — master ( 08f71e...df8093 )
by John
02:02
created

ToggleCommandKillCompressor()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 2
rs 10
c 0
b 0
f 0
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
/**
7
 * Code that kills compressor until interruption
8
 */
9
public class ToggleCommandKillCompressor extends Command {
10
11
    public ToggleCommandKillCompressor() {
12
        requires(Robot.SUB_COMPRESSOR);
13
    }
14
15
    protected void initialize() {
16
    	Robot.SUB_COMPRESSOR.setState(false);
17
    }
18
19
    protected void execute() {}
20
21
    protected boolean isFinished() {
22
        return false;
23
    }
24
25
    protected void end() {
26
    	Robot.SUB_COMPRESSOR.setState(true);
27
    }
28
29
    protected void interrupted() {
30
    	end();
31
    }
32
}
33