diff --git a/src/main/cli/settings.c b/src/main/cli/settings.c index 819b5ae15c..e713f4f296 100644 --- a/src/main/cli/settings.c +++ b/src/main/cli/settings.c @@ -660,7 +660,7 @@ const lookupTableEntry_t lookupTables[] = { const clivalue_t valueTable[] = { // PG_GYRO_CONFIG { PARAM_NAME_GYRO_HARDWARE_LPF, VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_GYRO_HARDWARE_LPF }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_hardware_lpf) }, - + #if defined(USE_GYRO_SPI_ICM20649) { "gyro_high_range", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_high_fsr) }, #endif @@ -1184,10 +1184,10 @@ const clivalue_t valueTable[] = { #ifdef USE_FEEDFORWARD { PARAM_NAME_FEEDFORWARD_TRANSITION, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_transition) }, { PARAM_NAME_FEEDFORWARD_AVERAGING, VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_FEEDFORWARD_AVERAGING }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_averaging) }, - { PARAM_NAME_FEEDFORWARD_SMOOTH_FACTOR, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = {0, 75}, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_smooth_factor) }, - { PARAM_NAME_FEEDFORWARD_JITTER_FACTOR, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = {0, 20}, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_jitter_factor) }, - { PARAM_NAME_FEEDFORWARD_BOOST, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 50 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_boost) }, - { PARAM_NAME_FEEDFORWARD_MAX_RATE_LIMIT, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = {0, 150}, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_max_rate_limit) }, + { PARAM_NAME_FEEDFORWARD_SMOOTH_FACTOR, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 75 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_smooth_factor) }, + { PARAM_NAME_FEEDFORWARD_JITTER_FACTOR, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 20 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_jitter_factor) }, + { PARAM_NAME_FEEDFORWARD_BOOST, VAR_INT8 | PROFILE_VALUE, .config.minmaxUnsigned = { -50, 50 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_boost) }, + { PARAM_NAME_FEEDFORWARD_MAX_RATE_LIMIT, VAR_UINT8 | PROFILE_VALUE, .config.minmaxUnsigned = { 0, 150 }, PG_PID_PROFILE, offsetof(pidProfile_t, feedforward_max_rate_limit) }, #endif #ifdef USE_DYN_IDLE diff --git a/src/main/cms/cms_menu_imu.c b/src/main/cms/cms_menu_imu.c index edb0be75b6..d38cbdf07f 100644 --- a/src/main/cms/cms_menu_imu.c +++ b/src/main/cms/cms_menu_imu.c @@ -524,7 +524,7 @@ static uint8_t cmsx_iterm_relax_cutoff; #ifdef USE_FEEDFORWARD static uint8_t cmsx_feedforward_transition; -static uint8_t cmsx_feedforward_boost; +static int8_t cmsx_feedforward_boost; static uint8_t cmsx_feedforward_averaging; static uint8_t cmsx_feedforward_smooth_factor; static uint8_t cmsx_feedforward_jitter_factor; @@ -637,7 +637,7 @@ static const OSD_Entry cmsx_menuProfileOtherEntries[] = { { "FF AVERAGING", OME_TAB, NULL, &(OSD_TAB_t) { &cmsx_feedforward_averaging, 4, lookupTableFeedforwardAveraging} }, { "FF SMOOTHNESS", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_feedforward_smooth_factor, 0, 75, 1 } }, { "FF JITTER", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_feedforward_jitter_factor, 0, 20, 1 } }, - { "FF BOOST", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_feedforward_boost, 0, 50, 1 } }, + { "FF BOOST", OME_UINT8, NULL, &(OSD_INT8_t) { &cmsx_feedforward_boost, -50, 50, 1 } }, #endif { "ANGLE STR", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_angleStrength, 0, 200, 1 } }, { "HORZN STR", OME_UINT8, NULL, &(OSD_UINT8_t) { &cmsx_horizonStrength, 0, 200, 1 } }, diff --git a/src/main/flight/pid.h b/src/main/flight/pid.h index 2adffac6bf..42d1b0f0b6 100644 --- a/src/main/flight/pid.h +++ b/src/main/flight/pid.h @@ -208,7 +208,7 @@ typedef struct pidProfile_s { uint8_t feedforward_averaging; // Number of packets to average when averaging is on uint8_t feedforward_smooth_factor; // Amount of lowpass type smoothing for feedforward steps uint8_t feedforward_jitter_factor; // Number of RC steps below which to attenuate feedforward - uint8_t feedforward_boost; // amount of setpoint acceleration to add to feedforward, 10 means 100% added + int8_t feedforward_boost; // setpoint acceleration added to feedforward, 10 means 100% added, higher is more than that uint8_t feedforward_max_rate_limit; // Maximum setpoint rate percentage for feedforward uint8_t dterm_lpf1_dyn_expo; // set the curve for dynamic dterm lowpass filter