+ this.setIndexWheelMotorVal(DEFAULT_INDEXING_MOTOR_VALUE);
+ }
+
+ public double calculateShooterSpeed() {
+ this.wheelController.setSetPoint(targetShootingSpeed);
+ double calculatedShooterIncrement = this.wheelController
+ .calcPID(this.getShooterRPM());
+ currentShooterMotorValue += calculatedShooterIncrement;
+ return currentShooterMotorValue;
+ }
+
+ public void initializePIDController() {
+ this.wheelController = new PIDController(wheelP, wheelI, wheelD);
+ this.wheelController.setDoneRange(10);
+ this.wheelController.setMaxOutput(1.0);
+ this.wheelController.setMinDoneCycles(3);
+ this.wheelController.setSetPoint(this.targetShootingSpeed);
+ this.currentShooterMotorValue = 0;
+ }
+
+ public Value getPistonValue() {
+ return piston.get();
+ }
+
+ public void setHighGear() {
+ changeGear(Constants.Shooter.HIGH_GEAR);
+ }
+
+ public void setLowGear() {
+ changeGear(Constants.Shooter.LOW_GEAR);
+ }
+
+ private void changeGear(DoubleSolenoid.Value gear) {
+ piston.set(gear);