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
;
5 import org
.usfirst
.frc
.team3501
.robot
.utils
.PIDController
;
7 import edu
.wpi
.first
.wpilibj
.command
.Command
;
10 * This command runs the fly wheel continuously at a set speed using a PID
11 * Controller when OI button managing fly wheel is pressed. The command will run
12 * the fly wheel motor until the button triggering it is released.
14 * Should only be run from the operator interface.
16 * pre-condition: This command must be run by a button in OI, with
17 * button.whileHeld(...).
19 * @author Shaina & Chris
21 public class RunFlyWheelContinuous
extends Command
{
22 private Shooter shooter
= Robot
.getShooter();
24 private PIDController wheelController
;
26 public RunFlyWheelContinuous() {
31 protected void initialize() {
32 shooter
.initializePIDController();
36 protected void execute() {
37 shooter
.setFlyWheelMotorVal(shooter
.calculateShooterSpeed());
41 protected boolean isFinished() {
46 protected void end() {
47 this.shooter
.stopFlyWheel();
51 protected void interrupted() {