docs(autotune): fix fixed-wing autotune docs to match actual behavior#11677
Conversation
Roll/pitch/yaw rates are described as a fixed ceiling autotune respects; in reality, with the default fw_autotune_rate_adjustment setting, autotune actively rewrites roll_rate/pitch_rate/yaw_rate while flying. The doc also claimed autotune sets P and I gains, which hasn't been true since gain the P/I/D-from-FF formula was removed in 2021. Neither yaw nor the MANUAL-mode no-op were mentioned. Rewrites the pre-flight parameter table and flying instructions to describe what the code actually does: FeedForward is tuned on all three axes, P/I are never touched, rate tuning depends on flight mode and fw_autotune_rate_adjustment, and AUTOTUNE has no effect at all in MANUAL mode.
PR Summary by QodoFix fixed-wing AUTOTUNE docs to match current tuning behavior
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1.
|
LIMIT caps rates at the starting value but isn't strictly monotonic downward - it can raise a previously-lowered rate back up toward that ceiling.
The fixed-wing AUTOTUNE documentation no longer matched the current implementation in src/main/flight/pid_autotune.c. A user reported confusion after their rates changed significantly during an AUTOTUNE flight, which they didn't expect based on the docs.
Changes
Corrected the pre-flight parameter table: roll_rate/pitch_rate/yaw_rate are described as fixed limits AUTOTUNE respects, but by default (fw_autotune_rate_adjustment = AUTO) AUTOTUNE actively rewrites them while flying. Documented all three fw_autotune_* settings that control this.
Removed the claim that AUTOTUNE sets P and I gains - that formula (P/I/D derived from FF) was removed from the code in 2021 (9dcf985, "Don't change P, I and D during autotune"). AUTOTUNE only ever tunes FeedForward gain and, conditionally, rate.
Added yaw to the flying instructions - the code tunes yaw identically to roll/pitch (own FF, own rate, own minimum rate floor), but the doc only described roll/pitch maneuvers.
Documented the flight-mode dependency: rate is tuned in ACRO/HORIZON but not ANGLE mode (FF still is), and AUTOTUNE has no effect at all - not even FeedForward - while flying in MANUAL mode (pid.c:881).