add end method code to initialize method
[3501/2017steamworks] / src / org / usfirst / frc / team3501 / robot / commands / intake / StopIntake.java
1 package org.usfirst.frc.team3501.robot.commands.intake;
2
3 import org.usfirst.frc.team3501.robot.Robot;
4
5 import edu.wpi.first.wpilibj.command.Command;
6
7 /**
8 * Stops running the intake.
9 *
10 * @author Meeta
11 *
12 */
13 public class StopIntake extends Command {
14 public StopIntake() {
15 requires(Robot.getIntake());
16 }
17
18 // Called just before this Command runs the first time
19 @Override
20 protected void initialize() {
21 Robot.getIntake().stopIntake();
22 }
23
24 // Called repeatedly when this Command is scheduled to run
25 @Override
26 protected void execute() {
27 }
28
29 // Called once after isFinished returns true
30 @Override
31 protected void end() {
32 }
33
34 // Called when another command which requires one or more of the same
35 // subsystems is scheduled to run
36 @Override
37 protected void interrupted() {
38 end();
39 }
40
41 @Override
42 protected boolean isFinished() {
43 return true;
44 }
45
46 }