mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
AFCS code refactoring
This commit is contained in:
parent
125cb1f4cc
commit
5513c359a6
3 changed files with 15 additions and 19 deletions
|
@ -271,14 +271,10 @@ void resetPidProfile(pidProfile_t *pidProfile)
|
|||
.chirp_frequency_end_deci_hz = 6000,
|
||||
.chirp_time_seconds = 20,
|
||||
#ifdef USE_AIRPLANE_FCS
|
||||
.afcs_pitch_stick_gain = 100,
|
||||
.afcs_pitch_damping_gain = 20,
|
||||
.afcs_stick_gain = { 100, 100, 100 },
|
||||
.afcs_damping_gain = { 20, 25, 500 },
|
||||
.afcs_pitch_damping_filter_time = 100,
|
||||
.afcs_pitch_stability_gain = 0,
|
||||
.afcs_roll_stick_gain = 100,
|
||||
.afcs_roll_damping_gain = 25,
|
||||
.afcs_yaw_stick_gain = 100,
|
||||
.afcs_yaw_damping_gain = 500,
|
||||
.afcs_yaw_damping_filter_time = 3000,
|
||||
.afcs_yaw_stability_gain = 0,
|
||||
#endif
|
||||
|
@ -1549,7 +1545,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim
|
|||
}
|
||||
|
||||
#ifdef USE_WING
|
||||
// When PASSTHRU_MODE is active - reset all PIDs to zero so the aircraft won't snap out of control
|
||||
// When PASSTHRU_MODE is active - reset all PIDs to zero so the aircraft won't snap out of control
|
||||
// because of accumulated PIDs once PASSTHRU_MODE gets disabled.
|
||||
bool isFixedWingAndPassthru = isFixedWing() && FLIGHT_MODE(PASSTHRU_MODE);
|
||||
#endif // USE_WING
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue