mirror of https://github.com/ArduPilot/ardupilot
AP_Periph: Correctly report Temperature to UAVCAN
This commit is contained in:
parent
89e4df485a
commit
819bb2938b
|
@ -1480,7 +1480,9 @@ void AP_Periph_FW::can_battery_update(void)
|
|||
}
|
||||
float temperature;
|
||||
if (battery.lib.get_temperature(temperature, i)) {
|
||||
pkt.temperature = temperature;
|
||||
// Battery lib reports temperature in Celsius.
|
||||
// Convert Celsius to Kelvin for tranmission on CAN.
|
||||
pkt.temperature = temperature + C_TO_KELVIN;
|
||||
}
|
||||
|
||||
fix_float16(pkt.voltage);
|
||||
|
|
Loading…
Reference in New Issue