Commit | Line | Data |
---|---|---|
763ccd44 M |
1 | package org.usfirst.frc.team3501.robot.commands.intake; |
2 | ||
6973b275 | 3 | import org.usfirst.frc.team3501.robot.Robot; |
dab6e7d6 AD |
4 | import org.usfirst.frc.team3501.robot.subsystems.Intake; |
5 | ||
763ccd44 M |
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() { | |
6973b275 | 16 | requires(Robot.getIntake()); |
763ccd44 M |
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() { | |
dab6e7d6 | 32 | Intake.intake.setSpeed(0); |
763ccd44 M |
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() { | |
dab6e7d6 | 39 | end(); |
763ccd44 M |
40 | } |
41 | ||
42 | @Override | |
43 | protected boolean isFinished() { | |
44 | // TODO Auto-generated method stub | |
6973b275 | 45 | return true; |
763ccd44 M |
46 | } |
47 | ||
48 | } |