inav icon indicating copy to clipboard operation
inav copied to clipboard

Low battery alarm beeps when board connected to pc without battery

Open tiriad opened this issue 2 years ago • 1 comments

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

  1. Flash version above 7.0
  2. Set predefined settings
  3. Activate motors and servos output
  4. 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

tiriad avatar Apr 10 '24 20:04 tiriad

fixed in https://github.com/iNavFlight/inav/pull/9933

b14ckyy avatar Apr 11 '24 19:04 b14ckyy