X-Git-Url: http://challenge-bot.com/repos/?p=3501%2F2017steamworks;a=blobdiff_plain;f=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FRunFlyWheelContinuous.java;h=af77483c85939ffa7205610078a4ee2630275805;hp=cc07893019111c9e88f0115784de98d079981862;hb=00f515a1e32e2ef2217aa5c981a860ec584f16f1;hpb=292b55d37ff914cf4f094b01b40f4389db29a200 diff --git a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java index cc07893..af77483 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java @@ -1,6 +1,7 @@ package org.usfirst.frc.team3501.robot.commands.shooter; import org.usfirst.frc.team3501.robot.Robot; +import org.usfirst.frc.team3501.robot.subsystems.Shooter; import edu.wpi.first.wpilibj.command.Command; @@ -17,7 +18,7 @@ import edu.wpi.first.wpilibj.command.Command; * @author Shaina */ public class RunFlyWheelContinuous extends Command { - private double motorVal; + private Shooter shooter = Robot.getShooter(); /** * See JavaDoc comment in class for details @@ -25,19 +26,19 @@ public class RunFlyWheelContinuous extends Command { * @param motorVal * value range from -1 to 1 */ - public RunFlyWheelContinuous(double motorVal) { - this.motorVal = motorVal; + public RunFlyWheelContinuous() { + requires(shooter); } // Called just before this Command runs the first time @Override protected void initialize() { - Robot.getShooter().setFlyWheelMotorVal(motorVal); } // Called repeatedly when this Command is scheduled to run @Override protected void execute() { + shooter.setFlyWheelMotorVal(shooter.CURRENT_SHOOTING_SPEED); } // Called once after isFinished returns true