mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
add BEEPER_SYSTEM_INIT condition
This commit is contained in:
parent
6b1e3fc2c4
commit
5b2e79525c
3 changed files with 5 additions and 3 deletions
|
@ -168,9 +168,10 @@ typedef struct beeperTableEntry_s {
|
|||
{ BEEPER_ENTRY(BEEPER_MULTI_BEEPS, 13, beep_multiBeeps, "MULTI_BEEPS") }, // FIXME having this listed makes no sense since the beep array will not be initialised.
|
||||
{ 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_ALL, 16, NULL, "ALL") },
|
||||
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 17, NULL, "PREFERED") },
|
||||
{ BEEPER_ENTRY(BEEPER_ALL, 17, NULL, "ALL") },
|
||||
{ BEEPER_ENTRY(BEEPER_PREFERENCE, 18, NULL, "PREFERED") },
|
||||
};
|
||||
|
||||
static const beeperTableEntry_t *currentBeeperEntry = NULL;
|
||||
|
|
|
@ -37,6 +37,7 @@ typedef enum {
|
|||
BEEPER_READY_BEEP, // Ring a tone when GPS is locked and ready
|
||||
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_ALL, // Turn ON or OFF all beeper conditions
|
||||
BEEPER_PREFERENCE, // Save prefered beeper configuration
|
||||
|
|
|
@ -477,7 +477,7 @@ void init(void)
|
|||
LED1_TOGGLE;
|
||||
LED0_TOGGLE;
|
||||
delay(25);
|
||||
BEEP_ON;
|
||||
if (!(getPreferedBeeperOffMask() & (1 << (BEEPER_SYSTEM_INIT - 1)))) BEEP_ON;
|
||||
delay(25);
|
||||
BEEP_OFF;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue