Replace .to<double>() and .template to<double>() with .value() (#3667)

It's a less verbose way to do the same thing.
This commit is contained in:
Tyler Veness
2021-10-25 08:58:12 -07:00
committed by GitHub
parent 6bc1db44bc
commit 181723e573
134 changed files with 782 additions and 826 deletions

View File

@@ -126,15 +126,15 @@ void RamseteCommand::Execute() {
targetWheelSpeeds.right,
(targetWheelSpeeds.right - m_prevSpeeds.right) / dt);
auto leftOutput = volt_t(m_leftController->Calculate(
m_speeds().left.to<double>(),
targetWheelSpeeds.left.to<double>())) +
leftFeedforward;
auto leftOutput =
volt_t(m_leftController->Calculate(m_speeds().left.value(),
targetWheelSpeeds.left.value())) +
leftFeedforward;
auto rightOutput = volt_t(m_rightController->Calculate(
m_speeds().right.to<double>(),
targetWheelSpeeds.right.to<double>())) +
rightFeedforward;
auto rightOutput =
volt_t(m_rightController->Calculate(m_speeds().right.value(),
targetWheelSpeeds.right.value())) +
rightFeedforward;
m_outputVolts(leftOutput, rightOutput);
} else {