Battery Remaining Capacity Reset

I am trying to find a way to reset the remaining battery percentage to 100% after a battery hot swap. I am flying long survey missions with multiple battery changes and it is faster to hot swap the batteries (while powering through USB) rather than power down the drone completely.

Anyone know how to reset back to 100% without recycling the power? Thanks.

This was only recently added to master in https://github.com/ArduPilot/ardupilot/pull/11615 and has not made it to any of the stable builds. (I’m unsure if Mission Planner gained a button to let you do this yet or not on master).

PREFLIGHT_REBOOT_SHUTDOWN from MP.

  1. Wait till 3D fix.
  2. First battery change. Some missions, finishing with RTL when battery voltage heard around 10V.
  3. Second battery change. Energy consumed is not reset. Some missions, finishing with RTL when battery voltage heard around 10V.
  4. Third battery change. Energy consumed is not reset. Arming not possible. Hud shows 12.41V battery as bad.
    QuadX7_2020-11-08 10-05-46_tlog_HUD_12V-BadBattery
  5. Controller is reset from MP (supply not interrupted).
  6. Controller reset resets energy and permits arming. Some missions, finishing with RTL when battery voltage heard around 10V.
  7. Fourth battery change. Energy consumed is not reset. Some missions, finishing with RTL when battery voltage heard around 10V.

Above:
ArduCopter V4.0.5 (3f6b43e3)
ChibiOS: d4fce84e
mini-pix 0026003F 34365119 34363234
Param space used: 1338/3840

For this controller the hardware correctly indicates a very low battery voltage with no battery (an incorrect hardware design would be with some pullup or whatever indicating a voltage not low), so the controller by itself can detect the battery change.

is a bad workaround, but is what I used here. Defining BATT_CAPACITY with an absurdly high value (such as 10 batteries) seems better, if not using this parameter.

Otherwise, is Using Python Scripts in Mission Planner the way to address this problem?