Merge pull request #831 from borisbstyle/master

Yaw_fix default values
This commit is contained in:
Dominic Clifton 2015-05-04 09:09:26 +01:00
commit a7faa28ee9
4 changed files with 6 additions and 5 deletions

View File

@ -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 |

View File

@ -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;

View File

@ -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]));
}

View File

@ -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},