Update ProfiledPIDController API (#1967)

This commit is contained in:
Oblarg
2019-10-24 23:37:55 -04:00
committed by Peter Johnson
parent d04eb35465
commit cbe05e7e8a
5 changed files with 72 additions and 23 deletions

View File

@@ -41,7 +41,7 @@ void SwerveModule::SetDesiredState(const frc::SwerveModuleState& state) {
// Calculate the turning motor output from the turning PID controller.
const auto turnOutput = m_turningPIDController.Calculate(
m_turningEncoder.Get(),
units::meter_t(m_turningEncoder.Get()),
// We have to convert to the meters type here because that's what
// ProfiledPIDController wants.
units::meter_t(state.angle.Radians().to<double>()));