mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
mavlink: improve readability
Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
committed by
Matthias Grob
parent
448454a317
commit
cde47e8fc0
@@ -190,7 +190,7 @@ private:
|
|||||||
if (i < mavlink_cell_slots) {
|
if (i < mavlink_cell_slots) {
|
||||||
bat_msg.voltages[i] = battery_status.voltage_cell_v[i] * 1000.f;
|
bat_msg.voltages[i] = battery_status.voltage_cell_v[i] * 1000.f;
|
||||||
|
|
||||||
} else if (i < mavlink_cell_slots + mavlink_cell_slots_extension) {
|
} else if ((i - mavlink_cell_slots) < mavlink_cell_slots_extension) {
|
||||||
bat_msg.voltages_ext[i - mavlink_cell_slots] = battery_status.voltage_cell_v[i] * 1000.f;
|
bat_msg.voltages_ext[i - mavlink_cell_slots] = battery_status.voltage_cell_v[i] * 1000.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user