From 17a430e5f960938cb2cf65a89b4a8af5d8297dcc Mon Sep 17 00:00:00 2001 From: Hydra Date: Tue, 11 Apr 2017 09:23:38 +0100 Subject: [PATCH] CF/BF - Fix missing #ifdef around the virtual current meter settings. --- src/main/fc/cli.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index 47a9a2e66..19895751c 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -628,8 +628,10 @@ static const clivalue_t valueTable[] = { { "ibata_scale", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_ADC_CONFIG, offsetof(currentSensorADCConfig_t, scale) }, { "ibata_offset", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_ADC_CONFIG, offsetof(currentSensorADCConfig_t, offset) }, // PG_CURRENT_SENSOR_ADC_CONFIG +#ifdef USE_VIRTUAL_CURRENT_METER { "ibatv_scale", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_VIRTUAL_CONFIG, offsetof(currentSensorVirtualConfig_t, scale) }, { "ibatv_offset", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_VIRTUAL_CONFIG, offsetof(currentSensorVirtualConfig_t, offset) }, +#endif // PG_BEEPER_DEV_CONFIG #ifdef BEEPER @@ -908,7 +910,9 @@ static servoParam_t servoParamsCopy[MAX_SUPPORTED_SERVOS]; static batteryConfig_t batteryConfigCopy; static voltageSensorADCConfig_t voltageSensorADCConfigCopy[MAX_VOLTAGE_SENSOR_ADC]; static currentSensorADCConfig_t currentSensorADCConfigCopy; +#ifdef USE_VIRTUAL_CURRENT_METER static currentSensorVirtualConfig_t currentSensorVirtualConfigCopy; +#endif static motorMixer_t customMotorMixerCopy[MAX_SUPPORTED_MOTORS]; static mixerConfig_t mixerConfigCopy; static flight3DConfig_t flight3DConfigCopy; @@ -1196,10 +1200,12 @@ static const cliCurrentAndDefaultConfig_t *getCurrentAndDefaultConfigs(pgn_t pgn ret.currentConfig = ¤tSensorADCConfigCopy; ret.defaultConfig = currentSensorADCConfig(); break; +#ifdef USE_VIRTUAL_CURRENT_METER case PG_CURRENT_SENSOR_VIRTUAL_CONFIG: ret.currentConfig = ¤tSensorVirtualConfigCopy; ret.defaultConfig = currentSensorVirtualConfig(); break; +#endif case PG_SERIAL_CONFIG: ret.currentConfig = &serialConfigCopy; ret.defaultConfig = serialConfig();