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

CF/BF - Fix missing #ifdef around the virtual current meter settings.

This commit is contained in:
Hydra 2017-04-11 09:23:38 +01:00 committed by Dominic Clifton
parent be063ebbbf
commit 17a430e5f9

View file

@ -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_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) }, { "ibata_offset", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_ADC_CONFIG, offsetof(currentSensorADCConfig_t, offset) },
// PG_CURRENT_SENSOR_ADC_CONFIG // 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_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) }, { "ibatv_offset", VAR_INT16 | MASTER_VALUE, .config.minmax = { -16000, 16000 }, PG_CURRENT_SENSOR_VIRTUAL_CONFIG, offsetof(currentSensorVirtualConfig_t, offset) },
#endif
// PG_BEEPER_DEV_CONFIG // PG_BEEPER_DEV_CONFIG
#ifdef BEEPER #ifdef BEEPER
@ -908,7 +910,9 @@ static servoParam_t servoParamsCopy[MAX_SUPPORTED_SERVOS];
static batteryConfig_t batteryConfigCopy; static batteryConfig_t batteryConfigCopy;
static voltageSensorADCConfig_t voltageSensorADCConfigCopy[MAX_VOLTAGE_SENSOR_ADC]; static voltageSensorADCConfig_t voltageSensorADCConfigCopy[MAX_VOLTAGE_SENSOR_ADC];
static currentSensorADCConfig_t currentSensorADCConfigCopy; static currentSensorADCConfig_t currentSensorADCConfigCopy;
#ifdef USE_VIRTUAL_CURRENT_METER
static currentSensorVirtualConfig_t currentSensorVirtualConfigCopy; static currentSensorVirtualConfig_t currentSensorVirtualConfigCopy;
#endif
static motorMixer_t customMotorMixerCopy[MAX_SUPPORTED_MOTORS]; static motorMixer_t customMotorMixerCopy[MAX_SUPPORTED_MOTORS];
static mixerConfig_t mixerConfigCopy; static mixerConfig_t mixerConfigCopy;
static flight3DConfig_t flight3DConfigCopy; static flight3DConfig_t flight3DConfigCopy;
@ -1196,10 +1200,12 @@ static const cliCurrentAndDefaultConfig_t *getCurrentAndDefaultConfigs(pgn_t pgn
ret.currentConfig = &currentSensorADCConfigCopy; ret.currentConfig = &currentSensorADCConfigCopy;
ret.defaultConfig = currentSensorADCConfig(); ret.defaultConfig = currentSensorADCConfig();
break; break;
#ifdef USE_VIRTUAL_CURRENT_METER
case PG_CURRENT_SENSOR_VIRTUAL_CONFIG: case PG_CURRENT_SENSOR_VIRTUAL_CONFIG:
ret.currentConfig = &currentSensorVirtualConfigCopy; ret.currentConfig = &currentSensorVirtualConfigCopy;
ret.defaultConfig = currentSensorVirtualConfig(); ret.defaultConfig = currentSensorVirtualConfig();
break; break;
#endif
case PG_SERIAL_CONFIG: case PG_SERIAL_CONFIG:
ret.currentConfig = &serialConfigCopy; ret.currentConfig = &serialConfigCopy;
ret.defaultConfig = serialConfig(); ret.defaultConfig = serialConfig();