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;fp=src%2Forg%2Fusfirst%2Ffrc%2Fteam3501%2Frobot%2Fcommands%2Fshooter%2FRunFlyWheelContinuous.java;h=fa5426e90a21580e42d14c76e7f2d98ef9ac72ed;hp=047fad40885a8e2f5caad590004cab64493dc5bb;hb=1782cbadb12ad13d30eab7597f656cbe17f48df2;hpb=ac77a7b890c794f807b764221ff72d9044791fab 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 047fad4..fa5426e 100644 --- a/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java +++ b/src/org/usfirst/frc/team3501/robot/commands/shooter/RunFlyWheelContinuous.java @@ -26,7 +26,7 @@ public class RunFlyWheelContinuous extends Command { private double wheelI; private double wheelD; private double target; - double shooterSpeed = 0; + private double shooterSpeed = 0; public RunFlyWheelContinuous() { this.wheelP = this.shooter.wheelP; @@ -37,7 +37,7 @@ public class RunFlyWheelContinuous extends Command { this.wheelController.setDoneRange(10); this.wheelController.setMaxOutput(1.0); this.wheelController.setMinDoneCycles(3); - this.target = 2700; + this.target = shooter.getCurrentShootingSpeed(); } @Override @@ -50,11 +50,7 @@ public class RunFlyWheelContinuous extends Command { double calculatedShooterIncrement = this.wheelController .calcPID(this.shooter.getShooterRPM()); shooterSpeed += calculatedShooterIncrement; - if (shooterSpeed > 1.0) - this.shooter.setFlyWheelMotorVal(1.0); - else - this.shooter.setFlyWheelMotorVal(shooterSpeed); - // this.shooter.setFlyWheelMotorVal(this.shooter.CURRENT_SHOOTING_SPEED); + this.shooter.setFlyWheelMotorVal(shooterSpeed); } @Override