This commit is contained in:
ryan123rudder
2020-02-01 12:40:39 -07:00
parent 68eb59bdc6
commit 43a454f9de
3 changed files with 9 additions and 10 deletions
@@ -79,11 +79,10 @@ public class Shooter extends SubsystemBase {
*/
public void runDrumShooterVelocityPID(double targetVel, double actualVel) {
velP = actualVel/targetVel;
if(velP < 0.1){
velP = 0.1;
}
double runSpeed = velP*(1-velP);
//System.err.println(runSpeed);
m_shooterFalcon.set(TalonFXControlMode.PercentOutput, runSpeed/*ShooterConstants.ENCODER_TICKS_PER_REV/600*/);
double runSpeed = actualVel + (20000*velP);
if (runSpeed > targetVel) {runSpeed = targetVel;}
System.err.println(velP + " " + runSpeed);
SmartDashboard.putNumber("shoot", actualVel);
m_shooterFalcon.set(TalonFXControlMode.Velocity, runSpeed);
}
}