Add Beeper disable ON_USB
This commit is contained in:
parent
3bd8c467c4
commit
be038743b2
|
@ -169,9 +169,10 @@ typedef struct beeperTableEntry_s {
|
||||||
{ BEEPER_ENTRY(BEEPER_DISARM_REPEAT, 14, beep_disarmRepeatBeep, "DISARM_REPEAT") },
|
{ BEEPER_ENTRY(BEEPER_DISARM_REPEAT, 14, beep_disarmRepeatBeep, "DISARM_REPEAT") },
|
||||||
{ BEEPER_ENTRY(BEEPER_ARMED, 15, beep_armedBeep, "ARMED") },
|
{ BEEPER_ENTRY(BEEPER_ARMED, 15, beep_armedBeep, "ARMED") },
|
||||||
{ BEEPER_ENTRY(BEEPER_SYSTEM_INIT, 16, NULL, "SYSTEM_INIT") },
|
{ 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_ALL, 18, NULL, "ALL") },
|
||||||
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 18, NULL, "PREFERED") },
|
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 19, NULL, "PREFERED") },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const beeperTableEntry_t *currentBeeperEntry = NULL;
|
static const beeperTableEntry_t *currentBeeperEntry = NULL;
|
||||||
|
@ -184,7 +185,7 @@ static const beeperTableEntry_t *currentBeeperEntry = NULL;
|
||||||
*/
|
*/
|
||||||
void beeper(beeperMode_e mode)
|
void beeper(beeperMode_e mode)
|
||||||
{
|
{
|
||||||
if (mode == BEEPER_SILENCE) {
|
if (mode == BEEPER_SILENCE || (mode == BEEPER_USB && (feature(FEATURE_VBAT) && (batteryCellCount < 2)))) {
|
||||||
beeperSilence();
|
beeperSilence();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ typedef enum {
|
||||||
BEEPER_MULTI_BEEPS, // Internal value used by 'beeperConfirmationBeeps()'.
|
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_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_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_ALL, // Turn ON or OFF all beeper conditions
|
||||||
BEEPER_PREFERENCE, // Save prefered beeper configuration
|
BEEPER_PREFERENCE, // Save prefered beeper configuration
|
||||||
|
|
Loading…
Reference in New Issue