mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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:
@@ -310,20 +310,20 @@ void MecanumControllerCommand::Execute() {
|
||||
(rearRightSpeedSetpoint - m_prevSpeeds.rearRight) / dt);
|
||||
|
||||
auto frontLeftOutput = volt_t(m_frontLeftController->Calculate(
|
||||
m_currentWheelSpeeds().frontLeft.to<double>(),
|
||||
frontLeftSpeedSetpoint.to<double>())) +
|
||||
m_currentWheelSpeeds().frontLeft.value(),
|
||||
frontLeftSpeedSetpoint.value())) +
|
||||
frontLeftFeedforward;
|
||||
auto rearLeftOutput = volt_t(m_rearLeftController->Calculate(
|
||||
m_currentWheelSpeeds().rearLeft.to<double>(),
|
||||
rearLeftSpeedSetpoint.to<double>())) +
|
||||
m_currentWheelSpeeds().rearLeft.value(),
|
||||
rearLeftSpeedSetpoint.value())) +
|
||||
rearLeftFeedforward;
|
||||
auto frontRightOutput = volt_t(m_frontRightController->Calculate(
|
||||
m_currentWheelSpeeds().frontRight.to<double>(),
|
||||
frontRightSpeedSetpoint.to<double>())) +
|
||||
m_currentWheelSpeeds().frontRight.value(),
|
||||
frontRightSpeedSetpoint.value())) +
|
||||
frontRightFeedforward;
|
||||
auto rearRightOutput = volt_t(m_rearRightController->Calculate(
|
||||
m_currentWheelSpeeds().rearRight.to<double>(),
|
||||
rearRightSpeedSetpoint.to<double>())) +
|
||||
m_currentWheelSpeeds().rearRight.value(),
|
||||
rearRightSpeedSetpoint.value())) +
|
||||
rearRightFeedforward;
|
||||
|
||||
m_outputVolts(frontLeftOutput, rearLeftOutput, frontRightOutput,
|
||||
|
||||
Reference in New Issue
Block a user