Betaflight: Recover mah consumed in case of battery ejection

Created on 16 Apr 2018  路  4Comments  路  Source: betaflight/betaflight

(Sorry if duplicate/existing feature)

Can we periodically write the mah consumed to EEPROM, so that in the event of a crash which ejects the battery - we can elect to continue that battery by plugging it back in and load the last logged mah consumed value via AUX switch input?

Most helpful comment

If you're ejecting enough batteries for this to be an issue, I'd say you need to work on your battery retention...

All 4 comments

Not really, writing to the same flash which is used for code execution while in flight sounds like a bad idea to me.

Odd use case. Put that semi-discharged battery in the charger, not in the Quad. Always start flying with a freshly charged battery.

If you're ejecting enough batteries for this to be an issue, I'd say you need to work on your battery retention...

Especially bad, since EEPROMS only have a given number ob write cycles. I remember ATMegas being writeable around 100.000 times.

You'll hit that pretty soon. For example, if you write out the mahs every 10 seconds:
100000 * 10 / 60 / 60 = 277 hours.

...resulting in your FC EEPROM being (partly?) readonly when the write cycle limit is hit, creating nasty problems when you upgrade your FC firmware (only partial flashing taking place, or no flashing possible at all)

Was this page helpful?
0 / 5 - 0 ratings