Tuning and Comments

This commit is contained in:
ryan123rudder
2020-02-10 19:21:10 -07:00
parent 6fbbca937c
commit 82ebcef450
2 changed files with 4 additions and 4 deletions
@@ -25,7 +25,7 @@ public class Shooter extends SubsystemBase {
double velP;
/**
* Creates a new Shooter.
* Creates a new Shooter subsystem.
*/
public Shooter() {
m_shooterFalcon.configFactoryDefault();
@@ -80,10 +80,10 @@ public class Shooter extends SubsystemBase {
//if (runSpeed > targetVel) {runSpeed = targetVel;}
SmartDashboard.putNumber("shoot", actualVel);
runSpeed = runSpeed/targetVel; //Convert to percent
if (actualVel < targetVel - 1000){
if (actualVel < targetVel - 1000){ //PID Based on ramp up amount
m_shooterFalcon.set(TalonFXControlMode.PercentOutput, runSpeed);
}
else{
else{ //PID Based on targetVel
m_shooterFalcon.set(TalonFXControlMode.Velocity, targetVel); //Init PID
}
}