Skip to content

mavproxy_battery: consume BATTERY_STATUS.voltages_ext to calculate total voltage#1690

Merged
peterbarker merged 1 commit into
ArduPilot:masterfrom
be-ska:volt-fix
May 25, 2026
Merged

mavproxy_battery: consume BATTERY_STATUS.voltages_ext to calculate total voltage#1690
peterbarker merged 1 commit into
ArduPilot:masterfrom
be-ska:volt-fix

Conversation

@be-ska

@be-ska be-ska commented May 21, 2026

Copy link
Copy Markdown
Contributor

When i connected my flashy 14s smart battery I've seen this in MAVProxy:
Screenshot 2026-05-19 at 11 25 15
42.3 / 14 = 3 V per cell, very bad, I thought the battery was already damaged lol.

The real reason is that mavproxy doesn't consume the voltages_ext in BATTERY_STATUS message, so it sums only the first 10 cells to calculate total voltage.

BATTERY_STATUS {id : 0, battery_function : 0, type : 0, temperature : 2810, voltages : [4230, 4230, 4238, 4242, 4234, 4226, 4226, 4234, 4226, 4226], current_battery : -19, current_consumed : 752, energy_consumed : 1440, battery_remaining : 97, time_remaining : 0, charge_state : 1, voltages_ext : [4230, 4234, 4226, 4234], mode : 0, fault_bitmask : 0}

With this PR the voltage is calculated properly:
Screenshot 2026-05-19 at 11 18 41

@peterbarker peterbarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@peterbarker peterbarker merged commit fef62e5 into ArduPilot:master May 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants