Remove percent tolerance from PID controller

It breaks the unit system badly; the tolerance member variable has
different units depending on percent vs absolute. Absolute tolerance is
a lot more natural than percent tolerance anyway.
This commit is contained in:
Tyler Veness
2019-08-25 13:01:51 -07:00
committed by Peter Johnson
parent 0ca8d667d2
commit ff8b8f0a8a
29 changed files with 121 additions and 507 deletions

View File

@@ -18,7 +18,7 @@ ShooterSubsystem::ShooterSubsystem()
m_shooterMotor(kShooterMotorPort),
m_feederMotor(kFeederMotorPort),
m_shooterEncoder(kEncoderPorts[0], kEncoderPorts[1]) {
m_controller.SetAbsoluteTolerance(kShooterToleranceRPS);
m_controller.SetTolerance(kShooterToleranceRPS);
m_shooterEncoder.SetDistancePerPulse(kEncoderDistancePerPulse);
}