| 1 | package org.usfirst.frc.team3501.robot.commands.shooter; |
| 2 | |
| 3 | import edu.wpi.first.wpilibj.command.Command; |
| 4 | |
| 5 | /** |
| 6 | * This command will run the fly wheel motor continuously until the button |
| 7 | * triggering it is released. |
| 8 | * |
| 9 | * pre-condition: This command must be run by a button in OI, with |
| 10 | * button.whileHeld(...). |
| 11 | * |
| 12 | * @author Shaina |
| 13 | */ |
| 14 | public class RunFlyWheelContinuous extends Command { |
| 15 | private double motorVal; |
| 16 | |
| 17 | /** |
| 18 | * See JavaDoc comment in class for details |
| 19 | * |
| 20 | * @param motorVal |
| 21 | * value range from -1 to 1 |
| 22 | */ |
| 23 | public RunFlyWheelContinuous(double motorVal) { |
| 24 | this.motorVal = motorVal; |
| 25 | } |
| 26 | |
| 27 | // Called just before this Command runs the first time |
| 28 | @Override |
| 29 | protected void initialize() { |
| 30 | } |
| 31 | |
| 32 | // Called repeatedly when this Command is scheduled to run |
| 33 | @Override |
| 34 | protected void execute() { |
| 35 | } |
| 36 | |
| 37 | // Called once after isFinished returns true |
| 38 | @Override |
| 39 | protected void end() { |
| 40 | } |
| 41 | |
| 42 | // Called when another command which requires one or more of the same |
| 43 | // subsystems is scheduled to run |
| 44 | @Override |
| 45 | protected void interrupted() { |
| 46 | end(); |
| 47 | } |
| 48 | |
| 49 | @Override |
| 50 | protected boolean isFinished() { |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | } |