|
|
|
@ -714,7 +714,7 @@ void Vehicle::_handleSysStatus(mavlink_message_t& message)
@@ -714,7 +714,7 @@ void Vehicle::_handleSysStatus(mavlink_message_t& message)
|
|
|
|
|
_batteryFactGroup.current()->setRawValue(VehicleBatteryFactGroup::_currentUnavailable); |
|
|
|
|
} else { |
|
|
|
|
// Current is in Amps, current_battery is 10 * milliamperes (1 = 10 milliampere)
|
|
|
|
|
_batteryFactGroup.current()->setRawValue((int)(sysStatus.current_battery / 100)); |
|
|
|
|
_batteryFactGroup.current()->setRawValue((float)sysStatus.current_battery / 100.0f); |
|
|
|
|
} |
|
|
|
|
if (sysStatus.voltage_battery == UINT16_MAX) { |
|
|
|
|
_batteryFactGroup.voltage()->setRawValue(VehicleBatteryFactGroup::_voltageUnavailable); |
|
|
|
|