betaflight icon indicating copy to clipboard operation
betaflight copied to clipboard

Refactor beeper

Open ledvinap opened this issue 10 months ago • 5 comments

Comments are in individual commits

ledvinap avatar Apr 02 '24 16:04 ledvinap

Do you want to test this code? You can flash it directly from Betaflight Configurator:

  • Simply put #13492 (this pull request number) in the Select commit field of the Configurator firmware flasher tab (you need to Enable expert mode, Show release candidates and Development).

WARNING: It may be unstable. Use only for testing!

github-actions[bot] avatar Apr 02 '24 16:04 github-actions[bot]

There are some open problems with beeper:

  1. beeper_off_flags & BEEPER_USB When set, all beeps are disabled, including OSD, onboard LED, LedStrip and DSHOT. Is that intentional? Keeping warning led function seems very reasonable, ledstrip is probably OK.

  2. beeper_off_flags & <FLAG> Old code did turn warningLedEnable() on. Visual beeper and ledstrip was off (https://github.com/betaflight/betaflight/pull/6947, this PR did break led blinking). New code blinks LED only.

  3. BEEPER_ARMED vas IMO almost continuous beep instead of - . Nobody cared for 7 years, so long beep is maybe expected now?

ledvinap avatar Apr 02 '24 16:04 ledvinap

As far as I can tell, motors only beep for Rx loss and Rx set. For Mag Cal, adding audio beeper is a big improvement. However without audio beeper, it is useful to have some other non-visual feedback. Would it be practical to provide a motor beep option that made a brief single 'motor beep' whenever any audio beep would be generated by the audio beeper?

ctzsnooze avatar Apr 03 '24 02:04 ctzsnooze

4.5 or 4.6?

nerdCopter avatar Apr 04 '24 17:04 nerdCopter

If there is nothing to fix - this would be 4.6

haslinghuis avatar Apr 04 '24 17:04 haslinghuis

@ledvinap please rebase

haslinghuis avatar May 16 '24 14:05 haslinghuis

Merged upstream

ledvinap avatar May 16 '24 17:05 ledvinap