BrainFPV / TauLabs

http://www.brainfpv.com
Other
27 stars 9 forks source link

Disabling Current Monitoring doesn't disable Battery Flighttime alerts #23

Closed pimvanpelt closed 9 years ago

pimvanpelt commented 9 years ago

As seen on BrainFPV with Brain-20150213-r1, disabling current monitoring will still compute erratic/floating current values, and increment mAh usage, eventually refusing to arm the FC because of Flighttime alerts.

Reproduce:

Expected: FC arms and you can fly.

Observed: FC refuses to arm, battery is considered discharged beyond safe flight parameter.

Workaround: Set ADC0 sensitivity to 0mV/A which makes current draw jump to 'inf', disabling the power consumption integral, never reaching alarm state.

Suggested fix: disable the integral entirely when current monitoring is turned off, regardless of ADC sensitivity (perhaps zero the current always). Suggested fix: disable rendering current in OSD and GCS when current monitoring is turned off.

This may be present upstream in taulabs as well - I can check if you'd like (I don't currently have a regular Taulabs FC to check on).

BrainFPV commented 9 years ago

Thanks for reporting this. It is indeed a bug. Note that you can also work-around it by setting the ADC pin to NONE.

I'm closing this, as it has been fixed in upstream Tau Labs. See https://github.com/TauLabs/TauLabs/pull/1508