From 2fa52007af39ada58c809fc4be53f35c7bd24491 Mon Sep 17 00:00:00 2001 From: Prateek Machiraju Date: Thu, 2 Jun 2022 20:04:18 -0700 Subject: [PATCH] [wpilibc] Use GetBatteryVoltage() in MotorController::SetVoltage This avoids having to cast to units::voltage_t --- wpilibc/src/main/native/cpp/motorcontrol/MotorController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpilibc/src/main/native/cpp/motorcontrol/MotorController.cpp b/wpilibc/src/main/native/cpp/motorcontrol/MotorController.cpp index a4a00a1ca7..9d20144ca8 100644 --- a/wpilibc/src/main/native/cpp/motorcontrol/MotorController.cpp +++ b/wpilibc/src/main/native/cpp/motorcontrol/MotorController.cpp @@ -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()); }