Allow inflight adjustment of rc_expo.
This commit is contained in:
parent
81e3425326
commit
9ddbb4ed9d
|
@ -268,6 +268,10 @@ static const adjustmentConfig_t defaultAdjustmentConfigs[ADJUSTMENT_FUNCTION_COU
|
|||
.adjustmentFunction = ADJUSTMENT_RC_RATE,
|
||||
.step = 1
|
||||
},
|
||||
{
|
||||
.adjustmentFunction = ADJUSTMENT_RC_EXPO,
|
||||
.step = 1
|
||||
},
|
||||
{
|
||||
.adjustmentFunction = ADJUSTMENT_PITCH_ROLL_RATE,
|
||||
.step = 1
|
||||
|
@ -316,6 +320,11 @@ void applyAdjustment(controlRateConfig_t *controlRateConfig, uint8_t adjustmentF
|
|||
controlRateConfig->rcRate8 = constrain(newValue, 0, 250); // FIXME magic numbers repeated in serial_cli.c
|
||||
generatePitchRollCurve(controlRateConfig);
|
||||
break;
|
||||
case ADJUSTMENT_RC_EXPO:
|
||||
newValue = (int)controlRateConfig->rcExpo8 + delta;
|
||||
controlRateConfig->rcExpo8 = constrain(newValue, 0, 100); // FIXME magic numbers repeated in serial_cli.c
|
||||
generatePitchRollCurve(controlRateConfig);
|
||||
break;
|
||||
case ADJUSTMENT_PITCH_ROLL_RATE:
|
||||
newValue = (int)controlRateConfig->rollPitchRate + delta;
|
||||
controlRateConfig->rollPitchRate = constrain(newValue, 0, 100); // FIXME magic numbers repeated in serial_cli.c
|
||||
|
|
|
@ -136,10 +136,11 @@ void updateActivatedModes(modeActivationCondition_t *modeActivationConditions);
|
|||
typedef enum {
|
||||
ADJUSTMENT_NONE = 0,
|
||||
ADJUSTMENT_RC_RATE,
|
||||
ADJUSTMENT_PITCH_ROLL_RATE
|
||||
ADJUSTMENT_RC_EXPO,
|
||||
ADJUSTMENT_PITCH_ROLL_RATE,
|
||||
} adjustmentFunction_e;
|
||||
|
||||
#define ADJUSTMENT_FUNCTION_COUNT 3
|
||||
#define ADJUSTMENT_FUNCTION_COUNT 4
|
||||
|
||||
typedef struct adjustmentConfig_s {
|
||||
uint8_t adjustmentFunction;
|
||||
|
|
Loading…
Reference in New Issue