From 9e53d97e4d5c1a3a041bbf23053131e4b762a552 Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Wed, 16 Jan 2019 18:26:13 -0500 Subject: [PATCH] Remove stale baro parameter baro_cf_alt --- src/main/interface/settings.c | 1 - src/main/sensors/barometer.c | 3 +-- src/main/sensors/barometer.h | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/interface/settings.c b/src/main/interface/settings.c index 0cd1a5b028..6bfcdff447 100644 --- a/src/main/interface/settings.c +++ b/src/main/interface/settings.c @@ -621,7 +621,6 @@ const clivalue_t valueTable[] = { { "baro_tab_size", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, BARO_SAMPLE_COUNT_MAX }, PG_BAROMETER_CONFIG, offsetof(barometerConfig_t, baro_sample_count) }, { "baro_noise_lpf", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 1000 }, PG_BAROMETER_CONFIG, offsetof(barometerConfig_t, baro_noise_lpf) }, { "baro_cf_vel", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 1000 }, PG_BAROMETER_CONFIG, offsetof(barometerConfig_t, baro_cf_vel) }, - { "baro_cf_alt", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 1000 }, PG_BAROMETER_CONFIG, offsetof(barometerConfig_t, baro_cf_alt) }, #endif // PG_RX_CONFIG diff --git a/src/main/sensors/barometer.c b/src/main/sensors/barometer.c index 95fdc290b7..1677b7b631 100644 --- a/src/main/sensors/barometer.c +++ b/src/main/sensors/barometer.c @@ -52,14 +52,13 @@ baro_t baro; // barometer access functions -PG_REGISTER_WITH_RESET_FN(barometerConfig_t, barometerConfig, PG_BAROMETER_CONFIG, 0); +PG_REGISTER_WITH_RESET_FN(barometerConfig_t, barometerConfig, PG_BAROMETER_CONFIG, 1); void pgResetFn_barometerConfig(barometerConfig_t *barometerConfig) { barometerConfig->baro_sample_count = 21; barometerConfig->baro_noise_lpf = 600; barometerConfig->baro_cf_vel = 985; - barometerConfig->baro_cf_alt = 965; barometerConfig->baro_hardware = BARO_DEFAULT; // For backward compatibility; ceate a valid default value for bus parameters diff --git a/src/main/sensors/barometer.h b/src/main/sensors/barometer.h index 0238808446..21755d22eb 100644 --- a/src/main/sensors/barometer.h +++ b/src/main/sensors/barometer.h @@ -45,7 +45,6 @@ typedef struct barometerConfig_s { uint8_t baro_sample_count; // size of baro filter array uint16_t baro_noise_lpf; // additional LPF to reduce baro noise uint16_t baro_cf_vel; // apply Complimentary Filter to keep the calculated velocity based on baro velocity (i.e. near real velocity) - uint16_t baro_cf_alt; // apply CF to use ACC for height estimation } barometerConfig_t; PG_DECLARE(barometerConfig_t, barometerConfig);