diff --git a/docs/Cli.md b/docs/Cli.md index 272ce58f5a..d026c550aa 100644 --- a/docs/Cli.md +++ b/docs/Cli.md @@ -179,6 +179,7 @@ Re-apply any new defaults as desired. | throttle_correction_angle | The throttle_correction_value will be added to the throttle input. It will be maximal at the throttle_correction_angle and over, null when the copter is leveled and proportional in bewteen. The angle is set with 0.1 deg steps from 1 to 900, ie : 300 = 30.0 deg, 225 = 22.5 deg. | 1 | 900 | 800 | Profile | UINT16 | | yaw_control_direction | | -1 | 1 | 1 | Master | INT8 | | yaw_direction | | -1 | 1 | 1 | Profile | INT8 | +| yaw_jump_prevention_limit | Prevent yaw jumps during yaw stops. To disable set to 500. | 200 | 80 | 500 | Master | UINT16 | | tri_unarmed_servo | On tricopter mix only, if this is set to 1, servo will always be correcting regardless of armed state. to disable this, set it to 0. | 0 | 1 | 1 | Profile | INT8 | | default_rate_profile | Default = profile number | 0 | 2 | | Profile | UINT8 | | rc_rate | | 0 | 250 | 90 | Rate Profile | UINT8 | @@ -241,4 +242,4 @@ Re-apply any new defaults as desired. | i_vel | | 0 | 200 | 45 | Profile | UINT8 | | d_vel | | 0 | 200 | 1 | Profile | UINT8 | | blackbox_rate_num | | 1 | 32 | 1 | Master | UINT8 | -| blackbox_rate_denom | | 1 | 32 | 1 | Master | UINT8 | +| blackbox_rate_denom | | 1 | 32 | 1 | Master | UINT8 | diff --git a/src/main/config/config.c b/src/main/config/config.c index 28bc6a6082..05e1c55ec2 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -319,7 +319,7 @@ void resetRcControlsConfig(rcControlsConfig_t *rcControlsConfig) { void resetMixerConfig(mixerConfig_t *mixerConfig) { mixerConfig->pid_at_min_throttle = 1; mixerConfig->yaw_direction = 1; - mixerConfig->yaw_jump_prevention_limit = 0; + mixerConfig->yaw_jump_prevention_limit = 200; #ifdef USE_SERVOS mixerConfig->tri_unarmed_servo = 1; mixerConfig->servo_lowpass_freq = 400; diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index fe70eff86d..55ae12cab1 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -564,8 +564,8 @@ void mixTable(void) { uint32_t i; - if (motorCount >= 4 && mixerConfig->yaw_jump_prevention_limit) { - // prevent "yaw jump" during yaw correction + if (motorCount >= 4 && mixerConfig->yaw_jump_prevention_limit < 500) { + // prevent "yaw jump" during yaw correction (500 is disabled jump protection) axisPID[YAW] = constrain(axisPID[YAW], -mixerConfig->yaw_jump_prevention_limit - ABS(rcCommand[YAW]), mixerConfig->yaw_jump_prevention_limit + ABS(rcCommand[YAW])); } diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 9d22ccc7af..28f23f34a2 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -387,7 +387,7 @@ const clivalue_t valueTable[] = { { "pid_at_min_throttle", VAR_UINT8 | MASTER_VALUE, &masterConfig.mixerConfig.pid_at_min_throttle, 0, 1 }, { "yaw_direction", VAR_INT8 | MASTER_VALUE, &masterConfig.mixerConfig.yaw_direction, -1, 1 }, - { "yaw_jump_prevention_limit", VAR_UINT16 | MASTER_VALUE, &masterConfig.mixerConfig.yaw_jump_prevention_limit, 0, 500 }, + { "yaw_jump_prevention_limit", VAR_UINT16 | MASTER_VALUE, &masterConfig.mixerConfig.yaw_jump_prevention_limit, 80, 500 }, #ifdef USE_SERVOS { "tri_unarmed_servo", VAR_INT8 | MASTER_VALUE, &masterConfig.mixerConfig.tri_unarmed_servo, 0, 1 }, { "servo_lowpass_freq", VAR_INT16 | MASTER_VALUE, &masterConfig.mixerConfig.servo_lowpass_freq, 10, 400},