1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
5 import edu
.wpi
.first
.wpilibj
.command
.Command
;
8 * This command runs index wheel continuously when OI button managing index
9 * wheel is pressed. The command will run the index wheel motor until the button
10 * triggering it is released.
12 * Should only be run from the operator interface.
14 * pre-condition: This command must be run by a button in OI with
15 * button.whileHeld(...).
19 public class RunIndexWheelContinuous
extends Command
{
20 private double motorVal
;
23 * See JavaDoc comment in class for details
26 * value range from -1 to 1
28 public RunIndexWheelContinuous(double motorVal
) {
29 this.motorVal
= motorVal
;
32 // Called just before this Command runs the first time
34 protected void initialize() {
35 Robot
.getShooter().setIndexWheelMotorVal(motorVal
);
38 // Called repeatedly when this Command is scheduled to run
40 protected void execute() {
43 // Called once after isFinished returns true
45 protected void end() {
48 // Called when another command which requires one or more of the same
49 // subsystems is scheduled to run
51 protected void interrupted() {
56 protected boolean isFinished() {