1 package org
.usfirst
.frc3501
.RiceCatRobot
.commands
;
3 import org
.usfirst
.frc3501
.RiceCatRobot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 public class ToggleCompressor
extends Command
{
12 public ToggleCompressor() {
15 // Called just before this Command runs the first time
16 protected void initialize() {
19 // Called repeatedly when this Command is scheduled to run
20 protected void execute() {
21 if (Robot
.compressor
.enabled()) {
22 Robot
.compressor
.stop();
24 Robot
.compressor
.start();
29 // Make this return true when this Command no longer needs to run execute()
30 protected boolean isFinished() {
34 // Called once after isFinished returns true
35 protected void end() {
39 // Called when another command which requires one or more of the same
40 // subsystems is scheduled to run
41 protected void interrupted() {