Reset beeper_frequency if valid timer is not found
This commit is contained in:
parent
37cd0404e5
commit
22a7788fa3
|
@ -50,6 +50,7 @@
|
|||
#include "io/serial.h"
|
||||
|
||||
#include "pg/beeper.h"
|
||||
#include "pg/beeper_dev.h"
|
||||
#include "pg/pg.h"
|
||||
#include "pg/pg_ids.h"
|
||||
|
||||
|
@ -356,6 +357,12 @@ static void validateAndFixConfig(void)
|
|||
featureClear(FEATURE_RSSI_ADC);
|
||||
#endif
|
||||
|
||||
#if defined(USE_BEEPER)
|
||||
if (beeperDevConfig()->frequency && !timerGetByTag(beeperDevConfig()->ioTag, TIM_USE_BEEPER)) {
|
||||
beeperDevConfigMutable()->frequency = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_VALIDATECONFIG)
|
||||
targetValidateConfiguration();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue