1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

Ensure that current meter feature is not disabled since it requires no

hardware io.
This commit is contained in:
Dominic Clifton 2015-01-31 21:56:01 +01:00
parent c85919325c
commit 27f0216a19

View file

@ -676,7 +676,9 @@ void validateAndFixConfig(void)
// rssi adc needs the same ports // rssi adc needs the same ports
featureClear(FEATURE_RSSI_ADC); featureClear(FEATURE_RSSI_ADC);
// current meter needs the same ports // current meter needs the same ports
if (masterConfig.batteryConfig.currentMeterType == CURRENT_SENSOR_ADC) {
featureClear(FEATURE_CURRENT_METER); featureClear(FEATURE_CURRENT_METER);
}
#endif #endif
#if defined(STM32F10X) || defined(CHEBUZZ) || defined(STM32F3DISCOVERY) #if defined(STM32F10X) || defined(CHEBUZZ) || defined(STM32F3DISCOVERY)
@ -709,13 +711,13 @@ void validateAndFixConfig(void)
#endif #endif
#if defined(NAZE) && defined(SONAR) #if defined(NAZE) && defined(SONAR)
if (feature(FEATURE_RX_PARALLEL_PWM) && feature(FEATURE_SONAR) && feature(FEATURE_CURRENT_METER)) { if (feature(FEATURE_RX_PARALLEL_PWM) && feature(FEATURE_SONAR) && feature(FEATURE_CURRENT_METER) && masterConfig.batteryConfig.currentMeterType == CURRENT_SENSOR_ADC) {
featureClear(FEATURE_CURRENT_METER); featureClear(FEATURE_CURRENT_METER);
} }
#endif #endif
#if defined(OLIMEXINO) && defined(SONAR) #if defined(OLIMEXINO) && defined(SONAR)
if (feature(FEATURE_SONAR) && feature(FEATURE_CURRENT_METER)) { if (feature(FEATURE_SONAR) && feature(FEATURE_CURRENT_METER) && masterConfig.batteryConfig.currentMeterType == CURRENT_SENSOR_ADC) {
featureClear(FEATURE_CURRENT_METER); featureClear(FEATURE_CURRENT_METER);
} }
#endif #endif