add precondition and Timeout to Expel and Intake commands
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / BallRollerExpelContinuous.java
CommitLineData
4e0d6389
LM
1package org.usfirst.frc.team3501.robot.commands;
2
3import org.usfirst.frc.team3501.robot.Robot;
4
3dd66f07
LM
5import edu.wpi.first.wpilibj.command.Command;
6
b4c621e5
LM
7/***
8 * This command will continually roll the rollers of the intake arm in the
9 * outwards direction and stop the rollers once the command is canceled.
10 *
3dd66f07
LM
11 * pre-condition: This command must be called by a button with the method
12 * .whileHeld() in OI
b4c621e5
LM
13 *
14 * @author Lauren and Niyati
15 *
16 */
17
03d32daf 18public class BallRollerExpelContinuous extends Command {
4e0d6389 19
03d32daf 20 public BallRollerExpelContinuous() {
df77579b 21 requires(Robot.intakeArm);
4e0d6389
LM
22 }
23
24 @Override
25 protected void initialize() {
4692be1b 26 Robot.intakeArm.outputBall();
4e0d6389
LM
27 }
28
29 @Override
30 protected void execute() {
31
32 }
33
34 @Override
35 protected boolean isFinished() {
36 return true;
37 }
38
39 @Override
40 protected void end() {
1828f5f6 41 Robot.intakeArm.stopRollers();
4e0d6389
LM
42 }
43
44 @Override
45 protected void interrupted() {
1828f5f6 46 end();
4e0d6389 47 }
4e0d6389 48}