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