mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Even more cleanups to the new beeper code. Seperate beeper mode and
priority via simpler static declaration - removes giant switch statement. Use a new method when beeping out GPS status. Lower memory usage. Smaller code size. Beeper priority now only handled in a single place.
This commit is contained in:
parent
85b524fa18
commit
064de090a0
3 changed files with 106 additions and 93 deletions
|
@ -142,7 +142,7 @@ void failsafeUpdateState(void)
|
|||
{
|
||||
bool receivingRxData = failsafeIsReceivingRxData();
|
||||
bool armed = ARMING_FLAG(ARMED);
|
||||
beeperMode_e beeperMode = BEEPER_STOPPED;
|
||||
beeperMode_e beeperMode = BEEPER_SILENCE;
|
||||
|
||||
if (receivingRxData) {
|
||||
failsafeState.phase = FAILSAFE_IDLE;
|
||||
|
@ -210,7 +210,7 @@ void failsafeUpdateState(void)
|
|||
}
|
||||
} while (reprocessState);
|
||||
|
||||
if (beeperMode != BEEPER_STOPPED) {
|
||||
if (beeperMode != BEEPER_SILENCE) {
|
||||
beeper(beeperMode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue