fill in code
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / intake / ReverseIntakeContinuous.java
CommitLineData
f43a1c52
CZ
1package org.usfirst.frc.team3501.robot.commands.intake;
2
6486f405
AD
3import org.usfirst.frc.team3501.robot.Robot;
4
f43a1c52
CZ
5import edu.wpi.first.wpilibj.command.Command;
6
7/**
8 * Reverses the intake until the button triggering this command is released
9 *
10 * pre-condition: button is pressed
11 */
12public class ReverseIntakeContinuous extends Command {
13
6486f405
AD
14 public ReverseIntakeContinuous() {
15 requires(Robot.getIntake());
f43a1c52
CZ
16 }
17
18 // Called just before this Command runs the first time
19 @Override
20 protected void initialize() {
5690f629
AD
21 Robot.getIntake().runReverseIntake();
22
f43a1c52
CZ
23 }
24
25 // Called repeatedly when this Command is scheduled to run
26 @Override
27 protected void execute() {
5690f629 28
f43a1c52
CZ
29 }
30
31 // Make this return true when this Command no longer needs to run execute()
32 @Override
33 protected boolean isFinished() {
34 return false;
35 }
36
37 // Called once after isFinished returns true
38 @Override
39 protected void end() {
5690f629 40 Robot.getIntake().stopIntake();
f43a1c52
CZ
41 }
42
43 // Called when another command which requires one or more of the same
44 // subsystems is scheduled to run
45 @Override
46 protected void interrupted() {
5690f629 47 end();
f43a1c52
CZ
48 }
49}