Skip to content

Commit

Permalink
mavlink: improve readability
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Grob <maetugr@gmail.com>
  • Loading branch information
julianoes and MaEtUgR committed Aug 29, 2023
1 parent 448454a commit cde47e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/mavlink/streams/BATTERY_STATUS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class MavlinkStreamBatteryStatus : public MavlinkStream
if (i < mavlink_cell_slots) {
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;
}
}
Expand Down

0 comments on commit cde47e8

Please sign in to comment.