fix conflicts
[3501/2015-FRC-Spark] / src / org / usfirst / frc3501 / RiceCatRobot / commands / ToggleCompressor.java
CommitLineData
f11ce98e
KZ
1package org.usfirst.frc3501.RiceCatRobot.commands;
2
4b8a525f 3import org.usfirst.frc3501.RiceCatRobot.robot.Robot;
f11ce98e
KZ
4
5import edu.wpi.first.wpilibj.command.Command;
6
7/**
8 *
9 */
10public class ToggleCompressor extends Command {
11
e3bfff96
KZ
12 public ToggleCompressor() {
13 }
14
15 // Called just before this Command runs the first time
16 protected void initialize() {
17 }
18
19 // Called repeatedly when this Command is scheduled to run
20 protected void execute() {
21 if (Robot.compressor.enabled()) {
22 Robot.compressor.stop();
23 } else {
24 Robot.compressor.start();
f11ce98e
KZ
25 }
26
e3bfff96 27 }
f11ce98e 28
e3bfff96
KZ
29 // Make this return true when this Command no longer needs to run execute()
30 protected boolean isFinished() {
31 return true;
32 }
f11ce98e 33
e3bfff96
KZ
34 // Called once after isFinished returns true
35 protected void end() {
f11ce98e 36
e3bfff96 37 }
f11ce98e 38
e3bfff96
KZ
39 // Called when another command which requires one or more of the same
40 // subsystems is scheduled to run
41 protected void interrupted() {
42 }
f11ce98e 43}