| 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 index 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 | * @param motorVal |
| 13 | * value range is from -1 to 1 |
| 14 | * @author Shaina |
| 15 | */ |
| 16 | public class RunIndexWheelContinuous extends Command { |
| 17 | private double motorVal; |
| 18 | |
| 19 | public RunIndexWheelContinuous(double motorVal) { |
| 20 | this.motorVal = motorVal; |
| 21 | } |
| 22 | |
| 23 | // Called just before this Command runs the first time |
| 24 | @Override |
| 25 | protected void initialize() { |
| 26 | } |
| 27 | |
| 28 | // Called repeatedly when this Command is scheduled to run |
| 29 | @Override |
| 30 | protected void execute() { |
| 31 | } |
| 32 | |
| 33 | // Called once after isFinished returns true |
| 34 | @Override |
| 35 | protected void end() { |
| 36 | } |
| 37 | |
| 38 | // Called when another command which requires one or more of the same |
| 39 | // subsystems is scheduled to run |
| 40 | @Override |
| 41 | protected void interrupted() { |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | protected boolean isFinished() { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | } |