Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed beeper -ON_USB for 1S setup, fixed beeper -SYSTEM_INIT #9147

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

RomanLut
Copy link
Contributor

This submit fixes two issues:

- beeper -ON_USB silences beeper completely on 1S setup.
IS: getBatteryCount()<2 is used to check if battery is disconnected
SHOULD: getBatteryState() == BATTERY_NOT_PRESENT should be used instead.

- beeper -SYSTEM_INIT does not disable system init sound.
IS: SYSTEM_INIT flag is read from beeper PREFERENCES for unknown reason.
SHOULD: getBeeperOffMask() should be used

Note: ON_USB was described as silencing when USB is connected. Actually it silences when battery is disconnected (so FC is powered from USB).

Note: System init sound is not influenced by ON_USB because system init sound is played before battery sensor is configured - Ok.

Note: I guess that on some FCs battery sensor may (incorrectly) sense USB voltage, and thus battery sensor can detect 1S battery. Well, on these targets ON_USB will not work. From the beeper part, code is correct. If workaround is reqired, it should be in battery sensor code, not in beeper code: getBatteryState() == BATTERY_NOT_PRESENT should work correctly.

Sidenote: personally I would remove beeper PREFERENCES as redundand feature.

fixed beeper SYSTEM_INIT
updated documentation
@DzikuVx DzikuVx added this to the 7.0 milestone Jun 28, 2023
@DzikuVx DzikuVx merged commit c0be8bc into iNavFlight:master Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants