Commit | Line | Data |
---|---|---|
f11ce98e KZ |
1 | package org.usfirst.frc3501.RiceCatRobot.commands; |
2 | ||
3 | import org.usfirst.frc3501.RiceCatRobot.Robot; | |
4 | ||
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
7 | /** | |
8 | * | |
9 | */ | |
10 | public class ToggleClaw extends Command { | |
11 | ||
e3bfff96 | 12 | public ToggleClaw() { |
f11ce98e | 13 | |
e3bfff96 | 14 | } |
f11ce98e | 15 | |
e3bfff96 KZ |
16 | protected void initialize() { |
17 | Robot.claw.toggleOn = !Robot.claw.toggleOn; | |
18 | } | |
f11ce98e | 19 | |
e3bfff96 KZ |
20 | protected void execute() { |
21 | if (Robot.claw.toggleOn && Robot.claw.isOpen()) { | |
22 | Robot.claw.closeClaw(); | |
f11ce98e | 23 | } |
e3bfff96 | 24 | } |
f11ce98e | 25 | |
e3bfff96 KZ |
26 | protected boolean isFinished() { |
27 | return true; | |
28 | } | |
f11ce98e | 29 | |
e3bfff96 | 30 | protected void end() { |
f11ce98e | 31 | |
e3bfff96 | 32 | } |
f11ce98e | 33 | |
e3bfff96 KZ |
34 | protected void interrupted() { |
35 | } | |
f11ce98e | 36 | } |