Allow independent in-flight adjustment of roll and pitch.
This commit is contained in:
parent
b595b49ca8
commit
e4a6886266
|
@ -402,8 +402,14 @@ void applyStepAdjustment(controlRateConfig_t *controlRateConfig, uint8_t adjustm
|
|||
generateThrottleCurve(controlRateConfig, escAndServoConfig);
|
||||
break;
|
||||
case ADJUSTMENT_PITCH_ROLL_RATE:
|
||||
case ADJUSTMENT_PITCH_RATE:
|
||||
newValue = (int)controlRateConfig->rates[FD_PITCH] + delta;
|
||||
controlRateConfig->rates[FD_PITCH] = constrain(newValue, 0, 100); // FIXME magic numbers repeated in serial_cli.c
|
||||
if (adjustmentFunction == ADJUSTMENT_PITCH_RATE) {
|
||||
break;
|
||||
}
|
||||
// follow though for combined ADJUSTMENT_PITCH_ROLL_RATE
|
||||
case ADJUSTMENT_ROLL_RATE:
|
||||
newValue = (int)controlRateConfig->rates[FD_ROLL] + delta;
|
||||
controlRateConfig->rates[FD_ROLL] = constrain(newValue, 0, 100); // FIXME magic numbers repeated in serial_cli.c
|
||||
break;
|
||||
|
|
|
@ -156,10 +156,12 @@ typedef enum {
|
|||
ADJUSTMENT_YAW_P,
|
||||
ADJUSTMENT_YAW_I,
|
||||
ADJUSTMENT_YAW_D,
|
||||
ADJUSTMENT_RATE_PROFILE
|
||||
ADJUSTMENT_RATE_PROFILE,
|
||||
ADJUSTMENT_PITCH_RATE,
|
||||
ADJUSTMENT_ROLL_RATE,
|
||||
} adjustmentFunction_e;
|
||||
|
||||
#define ADJUSTMENT_FUNCTION_COUNT 13
|
||||
#define ADJUSTMENT_FUNCTION_COUNT 15
|
||||
|
||||
typedef enum {
|
||||
ADJUSTMENT_MODE_STEP,
|
||||
|
|
Loading…
Reference in New Issue