From cc06113c8fcf032f2f09937f6ac11cda98192ff0 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Mon, 13 Jul 2015 01:54:45 +0100 Subject: [PATCH] Rename `yaw_direction` to `yaw_motor_direction` to avoid confusion between `yaw_control_direction` and yaw servo configuration. --- docs/Cli.md | 2 +- src/main/config/config.c | 2 +- src/main/flight/mixer.c | 2 +- src/main/flight/mixer.h | 2 +- src/main/io/serial_cli.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/Cli.md b/docs/Cli.md index 4e1e4b590..cc60810aa 100644 --- a/docs/Cli.md +++ b/docs/Cli.md @@ -183,7 +183,7 @@ Re-apply any new defaults as desired. | `throttle_correction_value` | 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. | 0 | 150 | 0 | Profile | UINT8 | | `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_motor_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 | diff --git a/src/main/config/config.c b/src/main/config/config.c index d332f85d8..c3e01ebf8 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -312,7 +312,7 @@ void resetRcControlsConfig(rcControlsConfig_t *rcControlsConfig) { void resetMixerConfig(mixerConfig_t *mixerConfig) { mixerConfig->pid_at_min_throttle = 1; - mixerConfig->yaw_direction = 1; + mixerConfig->yaw_motor_direction = 1; mixerConfig->yaw_jump_prevention_limit = 200; #ifdef USE_SERVOS mixerConfig->tri_unarmed_servo = 1; diff --git a/src/main/flight/mixer.c b/src/main/flight/mixer.c index 6ebb99f56..651241686 100755 --- a/src/main/flight/mixer.c +++ b/src/main/flight/mixer.c @@ -789,7 +789,7 @@ void mixTable(void) rcCommand[THROTTLE] * currentMixer[i].throttle + axisPID[PITCH] * currentMixer[i].pitch + axisPID[ROLL] * currentMixer[i].roll + - -mixerConfig->yaw_direction * axisPID[YAW] * currentMixer[i].yaw; + -mixerConfig->yaw_motor_direction * axisPID[YAW] * currentMixer[i].yaw; } if (ARMING_FLAG(ARMED)) { diff --git a/src/main/flight/mixer.h b/src/main/flight/mixer.h index d3bbb922c..fd37033bc 100644 --- a/src/main/flight/mixer.h +++ b/src/main/flight/mixer.h @@ -70,7 +70,7 @@ typedef struct mixer_t { typedef struct mixerConfig_s { uint8_t pid_at_min_throttle; // when enabled pids are used at minimum throttle - int8_t yaw_direction; + int8_t yaw_motor_direction; uint16_t yaw_jump_prevention_limit; // make limit configurable (original fixed value was 100) #ifdef USE_SERVOS uint8_t tri_unarmed_servo; // send tail servo correction pulses even when unarmed diff --git a/src/main/io/serial_cli.c b/src/main/io/serial_cli.c index 1f1115ecb..39b95a88d 100644 --- a/src/main/io/serial_cli.c +++ b/src/main/io/serial_cli.c @@ -399,7 +399,7 @@ const clivalue_t valueTable[] = { { "yaw_control_direction", VAR_INT8 | MASTER_VALUE, &masterConfig.yaw_control_direction, -1, 1 }, { "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_motor_direction", VAR_INT8 | MASTER_VALUE, &masterConfig.mixerConfig.yaw_motor_direction, -1, 1 }, { "yaw_jump_prevention_limit", VAR_UINT16 | MASTER_VALUE, &masterConfig.mixerConfig.yaw_jump_prevention_limit, YAW_JUMP_PREVENTION_LIMIT_LOW, YAW_JUMP_PREVENTION_LIMIT_HIGH }, #ifdef USE_SERVOS { "tri_unarmed_servo", VAR_INT8 | MASTER_VALUE, &masterConfig.mixerConfig.tri_unarmed_servo, 0, 1 },