mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Added config checks for the RSSI config. (#5644)
This commit is contained in:
parent
d749879cf6
commit
6cfec6fc53
1 changed files with 20 additions and 0 deletions
|
@ -260,6 +260,22 @@ static void validateAndFixConfig(void)
|
|||
pgResetFn_serialConfig(serialConfigMutable());
|
||||
}
|
||||
|
||||
#if !defined(USE_OSD_SLAVE)
|
||||
#if defined(USE_PWM) || defined(USE_PPM)
|
||||
if (feature(FEATURE_RX_PPM) || feature(FEATURE_RX_PARALLEL_PWM)) {
|
||||
rxConfigMutable()->rssi_src_frame_errors = false;
|
||||
} else
|
||||
#endif
|
||||
if (rxConfig()->rssi_src_frame_errors) {
|
||||
featureClear(FEATURE_RSSI_ADC);
|
||||
rxConfigMutable()->rssi_channel = 0;
|
||||
#if defined(USE_ADC)
|
||||
} else if (feature(FEATURE_RSSI_ADC)) {
|
||||
rxConfigMutable()->rssi_channel = 0;
|
||||
#endif
|
||||
}
|
||||
#endif // USE_OSD_SLAVE
|
||||
|
||||
// clear features that are not supported.
|
||||
// I have kept them all here in one place, some could be moved to sections of code above.
|
||||
|
||||
|
@ -331,6 +347,10 @@ static void validateAndFixConfig(void)
|
|||
featureClear(FEATURE_DYNAMIC_FILTER);
|
||||
#endif
|
||||
|
||||
#if !defined(USE_ADC)
|
||||
featureClear(FEATURE_RSSI_ADC);
|
||||
#endif
|
||||
|
||||
#if defined(TARGET_VALIDATECONFIG)
|
||||
targetValidateConfiguration();
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue