Skip to content

Commit

Permalink
Smith predict uint8 rather than 16 (#618)
Browse files Browse the repository at this point in the history
* Smith predict uint8 rather than 16
  • Loading branch information
nerdCopter authored Jun 23, 2021
1 parent dd91486 commit 61a96b9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/cms/cms_menu_imu.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static uint16_t gyroConfig_imuf_w;
static uint8_t smithPredictor_enabled;
static uint8_t smithPredictor_strength;
static uint8_t smithPredictor_delay;
static uint16_t smithPredictor_filt_hz;
static uint8_t smithPredictor_filt_hz;
#endif // USE_SMITH_PREDICTOR

static long cmsx_menuGyro_onEnter(void) {
Expand Down Expand Up @@ -616,7 +616,7 @@ static OSD_Entry cmsx_menuFilterGlobalEntries[] = {
{ "SMITH ENABLED", OME_TAB, NULL, &(OSD_TAB_t) { (uint8_t *) &smithPredictor_enabled, 1, cms_offOnLabels }, 0 },
{ "SMITH STR", OME_UINT8, NULL, &(OSD_UINT8_t) { &smithPredictor_strength, 0, 100, 1 }, 0 },
{ "SMITH DELAY", OME_UINT8, NULL, &(OSD_UINT8_t) { &smithPredictor_delay, 0, 120, 1 }, 0 },
{ "SMITH FILT", OME_UINT16, NULL, &(OSD_UINT16_t) { &smithPredictor_filt_hz, 1, 1000, 1 }, 0 },
{ "SMITH FILT HZ", OME_UINT8, NULL, &(OSD_UINT8_t) { &smithPredictor_filt_hz, 1, 250, 1 }, 0 },
#endif

{ "SAVE&EXIT", OME_OSD_Exit, cmsMenuExit, (void *)CMS_EXIT_SAVE, 0},
Expand Down
2 changes: 1 addition & 1 deletion src/main/interface/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ const clivalue_t valueTable[] = {
{ "smith_predict_enabled", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, smithPredictorEnabled) },
{ "smith_predict_str", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 100 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, smithPredictorStrength) },
{ "smith_predict_delay", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 120 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, smithPredictorDelay) },
{ "smith_predict_filt_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1, 10000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, smithPredictorFilterHz) },
{ "smith_predict_filt_hz", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 1, 250 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, smithPredictorFilterHz) },
#endif // USE_SMITH_PREDICTOR

// PG_ACCELEROMETER_CONFIG
Expand Down
2 changes: 1 addition & 1 deletion src/main/sensors/gyro.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ typedef struct gyroConfig_s {
uint8_t smithPredictorEnabled;
uint8_t smithPredictorStrength;
uint8_t smithPredictorDelay;
uint16_t smithPredictorFilterHz;
uint8_t smithPredictorFilterHz;
} gyroConfig_t;

PG_DECLARE(gyroConfig_t, gyroConfig);
Expand Down

0 comments on commit 61a96b9

Please sign in to comment.