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 | 4 | |
763ccd44 M |
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() { | |
6973b275 | 15 | requires(Robot.getIntake()); |
763ccd44 M |
16 | } |
17 | ||
18 | // Called just before this Command runs the first time | |
19 | @Override | |
20 | protected void initialize() { | |
d7f90383 | 21 | Robot.getIntake().stopIntake(); |
763ccd44 M |
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() { | |
dab6e7d6 | 38 | end(); |
763ccd44 M |
39 | } |
40 | ||
41 | @Override | |
42 | protected boolean isFinished() { | |
6973b275 | 43 | return true; |
763ccd44 M |
44 | } |
45 | ||
46 | } |