Low battery alarm beeps when board connected to pc without battery
Current Behavior
I have two similar flight controlers, one original and other clone. When updating from version 6, the original card reads 0V when connected to the pc, but the clone card reads approximately 1,20V. After this correction #9147 when connecting it without battery it detects 1 cell and activates BAT_CRIT_LOW even set beeper -ON_USB.
Steps to Reproduce
- Flash version above 7.0
- Set predefined settings
- Activate motors and servos output
- The beeper is activated by BAT_CRIT_LOW
Expected behavior
When the board is connected to a computer and the battery is not connected, the low battery alarm should not sound.
Suggested solution(s)
For example, set a condition that if the battery voltage is lower than 2.5 V no battery is connected or some more sophisticated solution. https://github.com/iNavFlight/inav/blob/b79dea677c9e83f115ff5f2b59793799ba6624c1/src/main/sensors/battery.c#L69 For example VBATT_PRESENT_THRESHOLD = 2000
fixed in https://github.com/iNavFlight/inav/pull/9933