mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Made new PID loop improvements conditional, disabled some for F3 to save flash space.
This commit is contained in:
parent
9d2c7fd105
commit
a9b3911e03
5 changed files with 71 additions and 14 deletions
|
@ -203,10 +203,12 @@ static FAST_RAM_ZERO_INIT filterApplyFnPtr dtermLowpass2ApplyFn;
|
||||||
static FAST_RAM_ZERO_INIT pt1Filter_t dtermLowpass2[2];
|
static FAST_RAM_ZERO_INIT pt1Filter_t dtermLowpass2[2];
|
||||||
static FAST_RAM_ZERO_INIT filterApplyFnPtr ptermYawLowpassApplyFn;
|
static FAST_RAM_ZERO_INIT filterApplyFnPtr ptermYawLowpassApplyFn;
|
||||||
static FAST_RAM_ZERO_INIT pt1Filter_t ptermYawLowpass;
|
static FAST_RAM_ZERO_INIT pt1Filter_t ptermYawLowpass;
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
static FAST_RAM_ZERO_INIT pt1Filter_t windupLpf[XYZ_AXIS_COUNT][2];
|
static FAST_RAM_ZERO_INIT pt1Filter_t windupLpf[XYZ_AXIS_COUNT][2];
|
||||||
static FAST_RAM_ZERO_INIT uint8_t itermRelax;
|
static FAST_RAM_ZERO_INIT uint8_t itermRelax;
|
||||||
static FAST_RAM_ZERO_INIT uint8_t itermRelaxCutoffLow;
|
static FAST_RAM_ZERO_INIT uint8_t itermRelaxCutoffLow;
|
||||||
static FAST_RAM_ZERO_INIT uint8_t itermRelaxCutoffHigh;
|
static FAST_RAM_ZERO_INIT uint8_t itermRelaxCutoffHigh;
|
||||||
|
#endif
|
||||||
|
|
||||||
void pidInitFilters(const pidProfile_t *pidProfile)
|
void pidInitFilters(const pidProfile_t *pidProfile)
|
||||||
{
|
{
|
||||||
|
@ -283,12 +285,15 @@ void pidInitFilters(const pidProfile_t *pidProfile)
|
||||||
}
|
}
|
||||||
|
|
||||||
pt1FilterInit(&throttleLpf, pt1FilterGain(pidProfile->throttle_boost_cutoff, dT));
|
pt1FilterInit(&throttleLpf, pt1FilterGain(pidProfile->throttle_boost_cutoff, dT));
|
||||||
if (itermRelax)
|
#if defined(USE_ITERM_RELAX)
|
||||||
|
if (itermRelax) {
|
||||||
for (int i = 0; i < XYZ_AXIS_COUNT; i++) {
|
for (int i = 0; i < XYZ_AXIS_COUNT; i++) {
|
||||||
pt1FilterInit(&windupLpf[i][0], pt1FilterGain(itermRelaxCutoffLow, dT));
|
pt1FilterInit(&windupLpf[i][0], pt1FilterGain(itermRelaxCutoffLow, dT));
|
||||||
pt1FilterInit(&windupLpf[i][1], pt1FilterGain(itermRelaxCutoffHigh, dT));
|
pt1FilterInit(&windupLpf[i][1], pt1FilterGain(itermRelaxCutoffHigh, dT));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct pidCoefficient_s {
|
typedef struct pidCoefficient_s {
|
||||||
float Kp;
|
float Kp;
|
||||||
|
@ -316,17 +321,23 @@ FAST_RAM_ZERO_INIT float throttleBoost;
|
||||||
pt1Filter_t throttleLpf;
|
pt1Filter_t throttleLpf;
|
||||||
static FAST_RAM_ZERO_INIT bool itermRotation;
|
static FAST_RAM_ZERO_INIT bool itermRotation;
|
||||||
|
|
||||||
|
#if defined(USE_SMART_FEEDFORWARD)
|
||||||
static FAST_RAM_ZERO_INIT bool smartFeedforward;
|
static FAST_RAM_ZERO_INIT bool smartFeedforward;
|
||||||
|
#endif
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
static FAST_RAM_ZERO_INIT float axisError[XYZ_AXIS_COUNT];
|
static FAST_RAM_ZERO_INIT float axisError[XYZ_AXIS_COUNT];
|
||||||
static FAST_RAM_ZERO_INIT float acGain;
|
static FAST_RAM_ZERO_INIT float acGain;
|
||||||
static FAST_RAM_ZERO_INIT float acLimit;
|
static FAST_RAM_ZERO_INIT float acLimit;
|
||||||
static FAST_RAM_ZERO_INIT float acErrorLimit;
|
static FAST_RAM_ZERO_INIT float acErrorLimit;
|
||||||
|
#endif
|
||||||
|
|
||||||
void pidResetITerm(void)
|
void pidResetITerm(void)
|
||||||
{
|
{
|
||||||
for (int axis = 0; axis < 3; axis++) {
|
for (int axis = 0; axis < 3; axis++) {
|
||||||
pidData[axis].I = 0.0f;
|
pidData[axis].I = 0.0f;
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
axisError[axis] = 0.0f;
|
axisError[axis] = 0.0f;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,10 +385,14 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
||||||
itermLimit = pidProfile->itermLimit;
|
itermLimit = pidProfile->itermLimit;
|
||||||
throttleBoost = pidProfile->throttle_boost * 0.1f;
|
throttleBoost = pidProfile->throttle_boost * 0.1f;
|
||||||
itermRotation = pidProfile->iterm_rotation;
|
itermRotation = pidProfile->iterm_rotation;
|
||||||
|
#if defined(USE_SMART_FEEDFORWARD)
|
||||||
smartFeedforward = pidProfile->smart_feedforward;
|
smartFeedforward = pidProfile->smart_feedforward;
|
||||||
|
#endif
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
itermRelax = pidProfile->iterm_relax;
|
itermRelax = pidProfile->iterm_relax;
|
||||||
itermRelaxCutoffLow = pidProfile->iterm_relax_cutoff_low;
|
itermRelaxCutoffLow = pidProfile->iterm_relax_cutoff_low;
|
||||||
itermRelaxCutoffHigh = pidProfile->iterm_relax_cutoff_high;
|
itermRelaxCutoffHigh = pidProfile->iterm_relax_cutoff_high;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ACRO_TRAINER
|
#ifdef USE_ACRO_TRAINER
|
||||||
acroTrainerAngleLimit = pidProfile->acro_trainer_angle_limit;
|
acroTrainerAngleLimit = pidProfile->acro_trainer_angle_limit;
|
||||||
|
@ -386,9 +401,11 @@ void pidInitConfig(const pidProfile_t *pidProfile)
|
||||||
acroTrainerGain = (float)pidProfile->acro_trainer_gain / 10.0f;
|
acroTrainerGain = (float)pidProfile->acro_trainer_gain / 10.0f;
|
||||||
#endif // USE_ACRO_TRAINER
|
#endif // USE_ACRO_TRAINER
|
||||||
|
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
acGain = (float)pidProfile->abs_control_gain;
|
acGain = (float)pidProfile->abs_control_gain;
|
||||||
acLimit = (float)pidProfile->abs_control_limit;
|
acLimit = (float)pidProfile->abs_control_limit;
|
||||||
acErrorLimit = (float)pidProfile->abs_control_error_limit;
|
acErrorLimit = (float)pidProfile->abs_control_error_limit;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void pidInit(const pidProfile_t *pidProfile)
|
void pidInit(const pidProfile_t *pidProfile)
|
||||||
|
@ -591,15 +608,21 @@ static void rotateVector(float v[XYZ_AXIS_COUNT], float rotation[XYZ_AXIS_COUNT]
|
||||||
|
|
||||||
static void rotateITermAndAxisError()
|
static void rotateITermAndAxisError()
|
||||||
{
|
{
|
||||||
if (itermRotation || acGain > 0) {
|
if (itermRotation
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
|
|| acGain > 0
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
const float gyroToAngle = dT * RAD;
|
const float gyroToAngle = dT * RAD;
|
||||||
float rotationRads[3];
|
float rotationRads[3];
|
||||||
for (int i = FD_ROLL; i <= FD_YAW; i++) {
|
for (int i = FD_ROLL; i <= FD_YAW; i++) {
|
||||||
rotationRads[i] = gyro.gyroADCf[i] * gyroToAngle;
|
rotationRads[i] = gyro.gyroADCf[i] * gyroToAngle;
|
||||||
}
|
}
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
if (acGain > 0) {
|
if (acGain > 0) {
|
||||||
rotateVector(axisError, rotationRads);
|
rotateVector(axisError, rotationRads);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (itermRotation) {
|
if (itermRotation) {
|
||||||
float v[3];
|
float v[3];
|
||||||
for (int i = 0; i < XYZ_AXIS_COUNT; i++) {
|
for (int i = 0; i < XYZ_AXIS_COUNT; i++) {
|
||||||
|
@ -743,13 +766,14 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
||||||
}
|
}
|
||||||
#endif // USE_YAW_SPIN_RECOVERY
|
#endif // USE_YAW_SPIN_RECOVERY
|
||||||
|
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
// mix in a correction for accrued attitude error
|
// mix in a correction for accrued attitude error
|
||||||
float stickSetpoint = currentPidSetpoint;
|
|
||||||
float acCorrection = 0;
|
float acCorrection = 0;
|
||||||
if (acGain > 0) {
|
if (acGain > 0) {
|
||||||
acCorrection = constrainf(axisError[axis] * acGain, -acLimit, acLimit);
|
acCorrection = constrainf(axisError[axis] * acGain, -acLimit, acLimit);
|
||||||
currentPidSetpoint += acCorrection;
|
currentPidSetpoint += acCorrection;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// -----calculate error rate
|
// -----calculate error rate
|
||||||
const float gyroRate = gyro.gyroADCf[axis]; // Process variable from gyro output in deg/sec
|
const float gyroRate = gyro.gyroADCf[axis]; // Process variable from gyro output in deg/sec
|
||||||
|
@ -770,11 +794,18 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----calculate I component
|
// -----calculate I component
|
||||||
float itermErrorRate;
|
float itermErrorRate = 0.0f;
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
float acErrorRate;
|
float acErrorRate;
|
||||||
|
#endif
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
if (itermRelax && (axis < FD_YAW || itermRelax == ITERM_RELAX_RPY )) {
|
if (itermRelax && (axis < FD_YAW || itermRelax == ITERM_RELAX_RPY )) {
|
||||||
const float gyroTargetLow = pt1FilterApply(&windupLpf[axis][0], stickSetpoint) + acCorrection;
|
float gyroTargetLow = pt1FilterApply(&windupLpf[axis][0], currentPidSetpoint);
|
||||||
const float gyroTargetHigh = pt1FilterApply(&windupLpf[axis][1], stickSetpoint) + acCorrection;
|
float gyroTargetHigh = pt1FilterApply(&windupLpf[axis][1], currentPidSetpoint);
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
|
gyroTargetLow += acCorrection;
|
||||||
|
gyroTargetHigh += acCorrection;
|
||||||
|
#endif
|
||||||
if (axis < FD_YAW) {
|
if (axis < FD_YAW) {
|
||||||
int itemOffset = (axis << 1);
|
int itemOffset = (axis << 1);
|
||||||
DEBUG_SET(DEBUG_ITERM_RELAX, itemOffset++, gyroTargetHigh);
|
DEBUG_SET(DEBUG_ITERM_RELAX, itemOffset++, gyroTargetHigh);
|
||||||
|
@ -782,19 +813,29 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
||||||
}
|
}
|
||||||
const float gmax = MAX(gyroTargetHigh, gyroTargetLow);
|
const float gmax = MAX(gyroTargetHigh, gyroTargetLow);
|
||||||
const float gmin = MIN(gyroTargetHigh, gyroTargetLow);
|
const float gmin = MIN(gyroTargetHigh, gyroTargetLow);
|
||||||
if (gyroRate >= gmin && gyroRate <= gmax) {
|
if (gyroRate < gmin || gyroRate > gmax) {
|
||||||
itermErrorRate = acCorrection;
|
|
||||||
} else {
|
|
||||||
itermErrorRate = (gyroRate > gmax ? gmax : gmin ) - gyroRate;
|
itermErrorRate = (gyroRate > gmax ? gmax : gmin ) - gyroRate;
|
||||||
}
|
}
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
|
else {
|
||||||
|
itermErrorRate = acCorrection;
|
||||||
|
}
|
||||||
acErrorRate = itermErrorRate - acCorrection;
|
acErrorRate = itermErrorRate - acCorrection;
|
||||||
} else {
|
#endif
|
||||||
itermErrorRate = acErrorRate = errorRate;
|
} else
|
||||||
|
#endif // USE_ITERM_RELAX
|
||||||
|
{
|
||||||
|
itermErrorRate = errorRate;
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
|
acErrorRate = errorRate;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
if (acGain > 0) {
|
if (acGain > 0) {
|
||||||
axisError[axis] = constrainf(axisError[axis] + acErrorRate * dT, -acErrorLimit, acErrorLimit);
|
axisError[axis] = constrainf(axisError[axis] + acErrorRate * dT, -acErrorLimit, acErrorLimit);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
const float ITerm = pidData[axis].I;
|
const float ITerm = pidData[axis].I;
|
||||||
const float ITermNew = constrainf(ITerm + pidCoefficient[axis].Ki * itermErrorRate * dynCi, -itermLimit, itermLimit);
|
const float ITermNew = constrainf(ITerm + pidCoefficient[axis].Ki * itermErrorRate * dynCi, -itermLimit, itermLimit);
|
||||||
|
@ -824,6 +865,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
||||||
const float pidFeedForward =
|
const float pidFeedForward =
|
||||||
pidCoefficient[axis].Kd * dynCd * transition *
|
pidCoefficient[axis].Kd * dynCd * transition *
|
||||||
(currentPidSetpoint - previousPidSetpoint[axis]) * tpaFactor / dT;
|
(currentPidSetpoint - previousPidSetpoint[axis]) * tpaFactor / dT;
|
||||||
|
#if defined(USE_SMART_FEEDFORWARD)
|
||||||
bool addFeedforward = true;
|
bool addFeedforward = true;
|
||||||
if (smartFeedforward) {
|
if (smartFeedforward) {
|
||||||
if (pidData[axis].P * pidFeedForward > 0) {
|
if (pidData[axis].P * pidFeedForward > 0) {
|
||||||
|
@ -835,7 +877,9 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, const rollAndPitchT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (addFeedforward) {
|
if (addFeedforward)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
pidData[axis].D += pidFeedForward;
|
pidData[axis].D += pidFeedForward;
|
||||||
}
|
}
|
||||||
previousGyroRateDterm[axis] = gyroRateDterm[axis];
|
previousGyroRateDterm[axis] = gyroRateDterm[axis];
|
||||||
|
|
|
@ -83,8 +83,6 @@ typedef enum
|
||||||
ITERM_RELAX_RPY
|
ITERM_RELAX_RPY
|
||||||
} itermRelax_e;
|
} itermRelax_e;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct pidProfile_s {
|
typedef struct pidProfile_s {
|
||||||
uint16_t yaw_lowpass_hz; // Additional yaw filter when yaw axis too noisy
|
uint16_t yaw_lowpass_hz; // Additional yaw filter when yaw axis too noisy
|
||||||
uint16_t dterm_lowpass_hz; // Delta Filter in hz
|
uint16_t dterm_lowpass_hz; // Delta Filter in hz
|
||||||
|
|
|
@ -337,9 +337,11 @@ static const char * const lookupTableVideoSystem[] = {
|
||||||
};
|
};
|
||||||
#endif // USE_MAX7456
|
#endif // USE_MAX7456
|
||||||
|
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
static const char * const lookupTableItermRelax[] = {
|
static const char * const lookupTableItermRelax[] = {
|
||||||
"OFF", "RP", "RPY"
|
"OFF", "RP", "RPY"
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ACRO_TRAINER
|
#ifdef USE_ACRO_TRAINER
|
||||||
static const char * const lookupTableAcroTrainerDebug[] = {
|
static const char * const lookupTableAcroTrainerDebug[] = {
|
||||||
|
@ -422,7 +424,9 @@ const lookupTableEntry_t lookupTables[] = {
|
||||||
#ifdef USE_MAX7456
|
#ifdef USE_MAX7456
|
||||||
LOOKUP_TABLE_ENTRY(lookupTableVideoSystem),
|
LOOKUP_TABLE_ENTRY(lookupTableVideoSystem),
|
||||||
#endif // USE_MAX7456
|
#endif // USE_MAX7456
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
LOOKUP_TABLE_ENTRY(lookupTableItermRelax),
|
LOOKUP_TABLE_ENTRY(lookupTableItermRelax),
|
||||||
|
#endif
|
||||||
#ifdef USE_ACRO_TRAINER
|
#ifdef USE_ACRO_TRAINER
|
||||||
LOOKUP_TABLE_ENTRY(lookupTableAcroTrainerDebug),
|
LOOKUP_TABLE_ENTRY(lookupTableAcroTrainerDebug),
|
||||||
#endif // USE_ACRO_TRAINER
|
#endif // USE_ACRO_TRAINER
|
||||||
|
@ -760,8 +764,12 @@ const clivalue_t valueTable[] = {
|
||||||
{ "crash_recovery", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_CRASH_RECOVERY }, PG_PID_PROFILE, offsetof(pidProfile_t, crash_recovery) },
|
{ "crash_recovery", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_CRASH_RECOVERY }, PG_PID_PROFILE, offsetof(pidProfile_t, crash_recovery) },
|
||||||
|
|
||||||
{ "iterm_rotation", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_rotation) },
|
{ "iterm_rotation", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_rotation) },
|
||||||
|
#if defined(USE_SMART_FEEDFORWARD)
|
||||||
{ "smart_feedforward", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, smart_feedforward) },
|
{ "smart_feedforward", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, smart_feedforward) },
|
||||||
|
#endif
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
{ "iterm_relax", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_ITERM_RELAX }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax) },
|
{ "iterm_relax", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_ITERM_RELAX }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax) },
|
||||||
|
#endif
|
||||||
{ "iterm_relax_cutoff_low", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax_cutoff_low) },
|
{ "iterm_relax_cutoff_low", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax_cutoff_low) },
|
||||||
{ "iterm_relax_cutoff_high", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax_cutoff_high) },
|
{ "iterm_relax_cutoff_high", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, iterm_relax_cutoff_high) },
|
||||||
{ "iterm_windup", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 30, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, itermWindupPointPercent) },
|
{ "iterm_windup", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 30, 100 }, PG_PID_PROFILE, offsetof(pidProfile_t, itermWindupPointPercent) },
|
||||||
|
@ -799,9 +807,11 @@ const clivalue_t valueTable[] = {
|
||||||
{ "horizon_tilt_effect", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 0, 250 }, PG_PID_PROFILE, offsetof(pidProfile_t, horizon_tilt_effect) },
|
{ "horizon_tilt_effect", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 0, 250 }, PG_PID_PROFILE, offsetof(pidProfile_t, horizon_tilt_effect) },
|
||||||
{ "horizon_tilt_expert_mode", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, horizon_tilt_expert_mode) },
|
{ "horizon_tilt_expert_mode", VAR_UINT8 | PROFILE_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_PID_PROFILE, offsetof(pidProfile_t, horizon_tilt_expert_mode) },
|
||||||
|
|
||||||
|
#if defined(USE_ABSOLUTE_CONTROL)
|
||||||
{ "abs_control_gain", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 0, 20 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_gain) },
|
{ "abs_control_gain", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 0, 20 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_gain) },
|
||||||
{ "abs_control_limit", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 10, 255 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_limit) },
|
{ "abs_control_limit", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 10, 255 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_limit) },
|
||||||
{ "abs_control_error_limit", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 45 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_error_limit) },
|
{ "abs_control_error_limit", VAR_UINT8 | PROFILE_VALUE, .config.minmax = { 1, 45 }, PG_PID_PROFILE, offsetof(pidProfile_t, abs_control_error_limit) },
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// PG_TELEMETRY_CONFIG
|
// PG_TELEMETRY_CONFIG
|
||||||
|
|
|
@ -98,7 +98,9 @@ typedef enum {
|
||||||
#ifdef USE_MAX7456
|
#ifdef USE_MAX7456
|
||||||
TABLE_VIDEO_SYSTEM,
|
TABLE_VIDEO_SYSTEM,
|
||||||
#endif // USE_MAX7456
|
#endif // USE_MAX7456
|
||||||
|
#if defined(USE_ITERM_RELAX)
|
||||||
TABLE_ITERM_RELAX,
|
TABLE_ITERM_RELAX,
|
||||||
|
#endif
|
||||||
#ifdef USE_ACRO_TRAINER
|
#ifdef USE_ACRO_TRAINER
|
||||||
TABLE_ACRO_TRAINER_DEBUG,
|
TABLE_ACRO_TRAINER_DEBUG,
|
||||||
#endif // USE_ACRO_TRAINER
|
#endif // USE_ACRO_TRAINER
|
||||||
|
|
|
@ -188,6 +188,7 @@
|
||||||
#define USE_ESC_SENSOR_INFO
|
#define USE_ESC_SENSOR_INFO
|
||||||
#define USE_CRSF_CMS_TELEMETRY
|
#define USE_CRSF_CMS_TELEMETRY
|
||||||
#define USE_BOARD_INFO
|
#define USE_BOARD_INFO
|
||||||
|
#define USE_SMART_FEEDFORWARD
|
||||||
|
|
||||||
#ifdef USE_SERIALRX_SPEKTRUM
|
#ifdef USE_SERIALRX_SPEKTRUM
|
||||||
#define USE_SPEKTRUM_BIND
|
#define USE_SPEKTRUM_BIND
|
||||||
|
@ -216,4 +217,6 @@
|
||||||
#define USE_TELEMETRY_MAVLINK
|
#define USE_TELEMETRY_MAVLINK
|
||||||
#define USE_UNCOMMON_MIXERS
|
#define USE_UNCOMMON_MIXERS
|
||||||
#define USE_SIGNATURE
|
#define USE_SIGNATURE
|
||||||
|
#define USE_ITERM_RELAX
|
||||||
|
#define USE_ABSOLUTE_CONTROL
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue