diff --git a/src/main/io/beeper.c b/src/main/io/beeper.c index 4992e7555..7a0e1d6b9 100644 --- a/src/main/io/beeper.c +++ b/src/main/io/beeper.c @@ -169,9 +169,10 @@ typedef struct beeperTableEntry_s { { BEEPER_ENTRY(BEEPER_DISARM_REPEAT, 14, beep_disarmRepeatBeep, "DISARM_REPEAT") }, { BEEPER_ENTRY(BEEPER_ARMED, 15, beep_armedBeep, "ARMED") }, { BEEPER_ENTRY(BEEPER_SYSTEM_INIT, 16, NULL, "SYSTEM_INIT") }, + { BEEPER_ENTRY(BEEPER_USB, 17, NULL, "ON_USB") }, - { BEEPER_ENTRY(BEEPER_ALL, 17, NULL, "ALL") }, - { BEEPER_ENTRY(BEEPER_PREFERENCE, 18, NULL, "PREFERED") }, + { BEEPER_ENTRY(BEEPER_ALL, 18, NULL, "ALL") }, + { BEEPER_ENTRY(BEEPER_PREFERENCE, 19, NULL, "PREFERED") }, }; static const beeperTableEntry_t *currentBeeperEntry = NULL; @@ -184,7 +185,7 @@ static const beeperTableEntry_t *currentBeeperEntry = NULL; */ void beeper(beeperMode_e mode) { - if (mode == BEEPER_SILENCE) { + if (mode == BEEPER_SILENCE || (mode == BEEPER_USB && (feature(FEATURE_VBAT) && (batteryCellCount < 2)))) { beeperSilence(); return; } diff --git a/src/main/io/beeper.h b/src/main/io/beeper.h index 19ebf7936..7d3ef38ef 100644 --- a/src/main/io/beeper.h +++ b/src/main/io/beeper.h @@ -38,6 +38,7 @@ typedef enum { BEEPER_MULTI_BEEPS, // Internal value used by 'beeperConfirmationBeeps()'. BEEPER_ARMED, // Warning beeps when board is armed (repeats until board is disarmed or throttle is increased) BEEPER_SYSTEM_INIT, // Initialisation beeps when board is powered on + BEEPER_USB, // Some boards have beeper powered USB connected BEEPER_ALL, // Turn ON or OFF all beeper conditions BEEPER_PREFERENCE, // Save prefered beeper configuration