mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-23 16:25:26 +03:00
Add USE_ prefix to AUTOTUNE_FIXED_WING
This commit is contained in:
parent
972f74bf60
commit
e1e14748b3
6 changed files with 7 additions and 7 deletions
|
@ -607,7 +607,7 @@ void processRx(timeUs_t currentTimeUs)
|
|||
DISABLE_FLIGHT_MODE(HEADFREE_MODE);
|
||||
}
|
||||
|
||||
#if defined(AUTOTUNE_FIXED_WING) || defined(AUTOTUNE_MULTIROTOR)
|
||||
#if defined(USE_AUTOTUNE_FIXED_WING) || defined(USE_AUTOTUNE_MULTIROTOR)
|
||||
autotuneUpdateState();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ void initActiveBoxIds(void)
|
|||
activeBoxIds[activeBoxIdCount++] = BOXNAVLAUNCH;
|
||||
}
|
||||
activeBoxIds[activeBoxIdCount++] = BOXAUTOTRIM;
|
||||
#if defined(AUTOTUNE_FIXED_WING)
|
||||
#if defined(USE_AUTOTUNE_FIXED_WING)
|
||||
activeBoxIds[activeBoxIdCount++] = BOXAUTOTUNE;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1092,7 +1092,7 @@ groups:
|
|||
|
||||
- name: PG_PID_AUTOTUNE_CONFIG
|
||||
type: pidAutotuneConfig_t
|
||||
condition: USE_NAV
|
||||
condition: USE_NAV && USE_AUTOTUNE_FIXED_WING
|
||||
members:
|
||||
- name: fw_autotune_overshoot_time
|
||||
field: fw_overshoot_time
|
||||
|
|
|
@ -483,7 +483,7 @@ static void pidApplyFixedWingRateController(pidState_t *pidState, flight_dynamic
|
|||
pidState->errorGyroIf = constrainf(pidState->errorGyroIf, -pidProfile()->fixedWingItermThrowLimit, pidProfile()->fixedWingItermThrowLimit);
|
||||
}
|
||||
|
||||
#ifdef AUTOTUNE_FIXED_WING
|
||||
#ifdef USE_AUTOTUNE_FIXED_WING
|
||||
if (FLIGHT_MODE(AUTO_TUNE) && !FLIGHT_MODE(MANUAL_MODE)) {
|
||||
autotuneFixedWingUpdate(axis, pidState->rateTarget, pidState->gyroRate, newPTerm + newFFTerm);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ typedef struct {
|
|||
|
||||
#define AUTOTUNE_SAVE_PERIOD 5000 // Save interval is 5 seconds - when we turn off autotune we'll restore values from previous update at most 5 sec ago
|
||||
|
||||
#if defined(AUTOTUNE_FIXED_WING) || defined(AUTOTUNE_MULTIROTOR)
|
||||
#if defined(USE_AUTOTUNE_FIXED_WING) || defined(USE_AUTOTUNE_MULTIROTOR)
|
||||
|
||||
static pidAutotuneData_t tuneCurrent[XYZ_AXIS_COUNT];
|
||||
static pidAutotuneData_t tuneSaved[XYZ_AXIS_COUNT];
|
||||
|
@ -159,7 +159,7 @@ static void blackboxLogAutotuneEvent(adjustmentFunction_e adjustmentFunction, in
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(AUTOTUNE_FIXED_WING)
|
||||
#if defined(USE_AUTOTUNE_FIXED_WING)
|
||||
|
||||
void autotuneFixedWingUpdate(const flight_dynamics_index_t axis, float desiredRateDps, float reachedRateDps, float pidOutput)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
#if (FLASH_SIZE > 128)
|
||||
#define NAV_FIXED_WING_LANDING
|
||||
#define AUTOTUNE_FIXED_WING
|
||||
#define USE_AUTOTUNE_FIXED_WING
|
||||
#define USE_ASYNC_GYRO_PROCESSING
|
||||
#define USE_DEBUG_TRACE
|
||||
#define USE_BOOTLOG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue