52280404754d0667d037f70c9436229420708dab
[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 import org.usfirst.frc.team3501.robot.subsystems.Intake;
5
6 import edu.wpi.first.wpilibj.command.Command;
7
8 /**
9 * Stops running the intake.
10 *
11 * @author Meeta
12 *
13 */
14 public class StopIntake extends Command {
15 public StopIntake() {
16 requires(Robot.getIntake());
17 }
18
19 // Called just before this Command runs the first time
20 @Override
21 protected void initialize() {
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 Intake.intake.setSpeed(0);
33 }
34
35 // Called when another command which requires one or more of the same
36 // subsystems is scheduled to run
37 @Override
38 protected void interrupted() {
39 end();
40 }
41
42 @Override
43 protected boolean isFinished() {
44 // TODO Auto-generated method stub
45 return true;
46 }
47
48 }