From dbfca3c25c022d1e71c234cc88a2b37393bca2f5 Mon Sep 17 00:00:00 2001 From: Quick-Flash <46289813+Quick-Flash@users.noreply.github.com> Date: Fri, 28 Feb 2020 23:37:20 -0700 Subject: [PATCH] 0.2.34 increasing the maximum value for IMUF Sharpness made to test higher values as well as imuf 227 which uses a more filtering and will therefore need more sharpness to get working nicely. Lets see how this works. --- src/main/build/version.h | 2 +- src/main/cms/cms_menu_imu.c | 2 +- src/main/flight/pid.c | 6 +++--- src/main/interface/settings.c | 6 +++--- src/main/sensors/gyro.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/build/version.h b/src/main/build/version.h index a1eebe70bc..2ba076eb14 100644 --- a/src/main/build/version.h +++ b/src/main/build/version.h @@ -25,7 +25,7 @@ #define FC_FIRMWARE_NAME "EmuFlight" #define FC_VERSION_MAJOR 0 // increment when a major release is made (big new feature, etc) #define FC_VERSION_MINOR 2 // increment when a minor release is made (small new feature, change etc) -#define FC_VERSION_PATCH_LEVEL 33 // increment when a bug is fixed +#define FC_VERSION_PATCH_LEVEL 34 // increment when a bug is fixed diff --git a/src/main/cms/cms_menu_imu.c b/src/main/cms/cms_menu_imu.c index 284c2d6386..dad1fd0da2 100644 --- a/src/main/cms/cms_menu_imu.c +++ b/src/main/cms/cms_menu_imu.c @@ -608,7 +608,7 @@ static OSD_Entry cmsx_menuImufEntries[] = { "ROLL Q", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_roll_q, 0, 16000, 100 }, 0 }, { "PITCH Q", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_pitch_q, 0, 16000, 100 }, 0 }, { "YAW Q", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_yaw_q, 0, 16000, 100 }, 0 }, - { "IMUF SHARPNESS", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_sharpness, 1, 500, 5 }, 0 }, + { "IMUF SHARPNESS", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_sharpness, 1, 5000, 5 }, 0 }, { "ROLL LPF", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_roll_lpf_cutoff_hz, 0, 450, 1 }, 0 }, { "PITCH LPF", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_pitch_lpf_cutoff_hz, 0, 450, 1 }, 0 }, { "YAW LPF", OME_UINT16, NULL, &(OSD_UINT16_t) { &gyroConfig_imuf_yaw_lpf_cutoff_hz, 0, 450, 1 }, 0 }, diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index ca7aff24dd..fee6f3b1d9 100755 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -133,9 +133,9 @@ void resetPidProfile(pidProfile_t *pidProfile) }, .dFilter = { - [PID_ROLL] = { 2, 100, 250, 50 }, - [PID_PITCH] = { 2, 100, 250, 50 }, - [PID_YAW] = { 0, 100, 250, 0 }, + [PID_ROLL] = { 2, 100, 250, 50 }, // wc, dtermlpf, dtermlpf2, smartSmoothing + [PID_PITCH] = { 2, 100, 250, 50 }, // wc, dtermlpf, dtermlpf2, smartSmoothing + [PID_YAW] = { 0, 100, 250, 0 }, // wc, dtermlpf, dtermlpf2, smartSmoothing }, .pidSumLimit = PIDSUM_LIMIT_MAX, diff --git a/src/main/interface/settings.c b/src/main/interface/settings.c index 630b964cc9..b602e4ce9c 100644 --- a/src/main/interface/settings.c +++ b/src/main/interface/settings.c @@ -496,8 +496,8 @@ const clivalue_t valueTable[] = { { "gyro_notch2_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_soft_notch_hz_2) }, { "gyro_notch2_cutoff", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_soft_notch_cutoff_2) }, - { "gyro_calib_duration", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 50, 3000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyroCalibrationDuration) }, - { "gyro_calib_noise_limit", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 200 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyroMovementCalibrationThreshold) }, + { "gyro_calib_duration", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 50, 3000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyroCalibrationDuration) }, + { "gyro_calib_noise_limit", VAR_UINT8 | MASTER_VALUE, .config.minmax = { 0, 200 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyroMovementCalibrationThreshold) }, { "gyro_offset_yaw", VAR_INT16 | MASTER_VALUE, .config.minmax = { -1000, 1000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, gyro_offset_yaw) }, #ifdef USE_GYRO_IMUF9001 { "imuf_rate", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_IMUF_RATE }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_rate) }, @@ -509,7 +509,7 @@ const clivalue_t valueTable[] = { { "imuf_roll_lpf_cutoff_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 450 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_roll_lpf_cutoff_hz) }, { "imuf_yaw_lpf_cutoff_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 450 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_yaw_lpf_cutoff_hz) }, { "imuf_acc_lpf_cutoff_hz", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 30, 180 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_acc_lpf_cutoff_hz) }, - { "imuf_sharpness", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1, 500 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_sharpness) }, + { "imuf_sharpness", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 1, 5000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_sharpness) }, #else { "imuf_roll_q", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_roll_q) }, { "imuf_pitch_q", VAR_UINT16 | MASTER_VALUE, .config.minmax = { 0, 16000 }, PG_GYRO_CONFIG, offsetof(gyroConfig_t, imuf_pitch_q) }, diff --git a/src/main/sensors/gyro.c b/src/main/sensors/gyro.c index 05388e3e35..dd24e42c1a 100644 --- a/src/main/sensors/gyro.c +++ b/src/main/sensors/gyro.c @@ -256,7 +256,7 @@ PG_RESET_TEMPLATE(gyroConfig_t, gyroConfig, .imuf_pitch_lpf_cutoff_hz = IMUF_DEFAULT_LPF_HZ, .imuf_yaw_lpf_cutoff_hz = IMUF_DEFAULT_LPF_HZ, .imuf_acc_lpf_cutoff_hz = IMUF_DEFAULT_ACC_LPF_HZ, - .imuf_sharpness = 35, + .imuf_sharpness = 75, .gyro_offset_yaw = 0, .averagedGyro[ROLL] = 0, .averagedGyro[PITCH] = 0,