betaflight / betaflight

Open Source Flight Controller Firmware
GNU General Public License v3.0
8.06k stars 2.87k forks source link

Refactor beeper #13492

Closed ledvinap closed 2 weeks ago

ledvinap commented 2 months ago

Comments are in individual commits

github-actions[bot] commented 2 months ago

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

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

ledvinap commented 2 months ago

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?

ctzsnooze commented 2 months ago

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?

nerdCopter commented 1 month ago

4.5 or 4.6?

haslinghuis commented 1 month ago

If there is nothing to fix - this would be 4.6

haslinghuis commented 2 weeks ago

@ledvinap please rebase

ledvinap commented 2 weeks ago

Merged upstream