mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Implement DriverStation::GetBatteryVoltage
Make the GetBatteryVoltage method work using the new tPower header Change-Id: If504f8a46f3f7f737f0b729b72fc6b5da0d29ff9
This commit is contained in:
@@ -162,7 +162,11 @@ void DriverStation::GetData()
|
||||
*/
|
||||
float DriverStation::GetBatteryVoltage()
|
||||
{
|
||||
return 0.0f; // TODO
|
||||
int32_t status = 0;
|
||||
float voltage = getVinVoltage(&status);
|
||||
wpi_setErrorWithContext(status, "getVinVoltage");
|
||||
|
||||
return voltage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user