Commit | Line | Data |
---|---|---|
4e0d6389 LM |
1 | package org.usfirst.frc.team3501.robot.commands; |
2 | ||
3 | import org.usfirst.frc.team3501.robot.Robot; | |
4 | ||
5 | import edu.wpi.first.wpilibj.command.Command; | |
6 | ||
7 | public class ToggleBallRollerExpel extends Command { | |
4e0d6389 | 8 | |
88c84792 | 9 | // Must be called with whileHeld in oi |
4e0d6389 | 10 | public ToggleBallRollerExpel() { |
df77579b | 11 | requires(Robot.intakeArm); |
4e0d6389 LM |
12 | } |
13 | ||
14 | @Override | |
15 | protected void initialize() { | |
2b65c91d LM |
16 | if (Robot.intakeArm.areRollersRolling()) |
17 | Robot.intakeArm.stopRollers(); | |
18 | else | |
89a4a089 | 19 | Robot.intakeArm.outputBall(); |
4e0d6389 LM |
20 | } |
21 | ||
22 | @Override | |
23 | protected void execute() { | |
24 | ||
25 | } | |
26 | ||
27 | @Override | |
28 | protected boolean isFinished() { | |
29 | return true; | |
30 | } | |
31 | ||
32 | @Override | |
33 | protected void end() { | |
1828f5f6 | 34 | Robot.intakeArm.stopRollers(); |
4e0d6389 LM |
35 | } |
36 | ||
37 | @Override | |
38 | protected void interrupted() { | |
1828f5f6 | 39 | end(); |
4e0d6389 | 40 | } |
4e0d6389 | 41 | } |