1 package org
.usfirst
.frc
.team3501
.robot
.commands
.shooter
;
3 import org
.usfirst
.frc
.team3501
.robot
.Robot
;
4 import org
.usfirst
.frc
.team3501
.robot
.subsystems
.Shooter
;
6 import edu
.wpi
.first
.wpilibj
.command
.Command
;
9 * This command runs the fly wheel continuously when OI button managing fly
10 * wheel is pressed. The command will run the fly wheel motor until the button
11 * triggering it is released.
13 * Should only be run from the operator interface.
15 * pre-condition: This command must be run by a button in OI, with
16 * button.whileHeld(...).
20 public class RunFlyWheelContinuous
extends Command
{
21 private Shooter shooter
= Robot
.getShooter();
24 * See JavaDoc comment in class for details
27 * value range from -1 to 1
29 public RunFlyWheelContinuous() {
33 // Called just before this Command runs the first time
35 protected void initialize() {
38 // Called repeatedly when this Command is scheduled to run
40 protected void execute() {
41 shooter
.setFlyWheelMotorVal(shooter
.CURRENT_SHOOTING_SPEED
);
44 // Called once after isFinished returns true
46 protected void end() {
49 // Called when another command which requires one or more of the same
50 // subsystems is scheduled to run
52 protected void interrupted() {
57 protected boolean isFinished() {
58 return !Robot
.getOI().toggleFlyWheel
.get();