Commit | Line | Data |
---|---|---|
809609c9 | 1 | package org.usfirst.frc.team3501.robot.commands.shooter; |
2 | ||
f3db582d | 3 | import org.usfirst.frc.team3501.robot.Robot; |
f74d236d | 4 | import org.usfirst.frc.team3501.robot.subsystems.Shooter; |
f3db582d | 5 | |
809609c9 | 6 | import edu.wpi.first.wpilibj.command.Command; |
7 | ||
05a85c82 | 8 | /** |
27d2386f | 9 | * This command stops the fly wheel. Do not call unless the trigger button has |
10 | * been released. | |
973f0ac4 | 11 | * |
b7ef589a | 12 | * |
973f0ac4 | 13 | * @author Shaina |
05a85c82 | 14 | */ |
809609c9 | 15 | public class StopFlyWheel extends Command { |
f74d236d CZ |
16 | private Shooter shooter = Robot.getShooter(); |
17 | ||
b7ef589a | 18 | /** |
19 | * This command stops the fly wheel. | |
20 | */ | |
973f0ac4 | 21 | public StopFlyWheel() { |
f74d236d | 22 | requires(shooter); |
973f0ac4 | 23 | } |
24 | ||
25 | // Called just before this Command runs the first time | |
26 | @Override | |
27 | protected void initialize() { | |
28 | } | |
29 | ||
30 | // Called repeatedly when this Command is scheduled to run | |
31 | @Override | |
32 | protected void execute() { | |
33 | } | |
34 | ||
35 | // Called once after isFinished returns true | |
36 | @Override | |
37 | protected void end() { | |
f3db582d | 38 | Robot.getShooter().stopFlyWheel(); |
973f0ac4 | 39 | } |
40 | ||
41 | // Called when another command which requires one or more of the same | |
42 | // subsystems is scheduled to run | |
43 | @Override | |
44 | protected void interrupted() { | |
f74d236d | 45 | end(); |
973f0ac4 | 46 | } |
47 | ||
48 | @Override | |
49 | protected boolean isFinished() { | |
f3db582d | 50 | return true; |
973f0ac4 | 51 | } |
809609c9 | 52 | |
53 | } |