[wpilibc] Use GetBatteryVoltage() in MotorController::SetVoltage

This avoids having to cast to units::voltage_t
This commit is contained in:
Prateek Machiraju
2022-06-02 20:04:18 -07:00
committed by Peter Johnson
parent d9f9cd1140
commit 2fa52007af

View File

@@ -9,5 +9,5 @@
using namespace frc;
void MotorController::SetVoltage(units::volt_t output) {
Set(output / units::volt_t(RobotController::GetInputVoltage()));
Set(output / RobotController::GetBatteryVoltage());
}