mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user