mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Reset beeper_frequency if valid timer is not found
This commit is contained in:
parent
37cd0404e5
commit
22a7788fa3
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,7 @@
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
#include "pg/beeper.h"
|
#include "pg/beeper.h"
|
||||||
|
#include "pg/beeper_dev.h"
|
||||||
#include "pg/pg.h"
|
#include "pg/pg.h"
|
||||||
#include "pg/pg_ids.h"
|
#include "pg/pg_ids.h"
|
||||||
|
|
||||||
|
@ -356,6 +357,12 @@ static void validateAndFixConfig(void)
|
||||||
featureClear(FEATURE_RSSI_ADC);
|
featureClear(FEATURE_RSSI_ADC);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_BEEPER)
|
||||||
|
if (beeperDevConfig()->frequency && !timerGetByTag(beeperDevConfig()->ioTag, TIM_USE_BEEPER)) {
|
||||||
|
beeperDevConfigMutable()->frequency = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(TARGET_VALIDATECONFIG)
|
#if defined(TARGET_VALIDATECONFIG)
|
||||||
targetValidateConfiguration();
|
targetValidateConfiguration();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue