Skip to content

AC_Autotune: Fix gain load problem when mode set to FAILED #30141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

lthall
Copy link
Contributor

@lthall lthall commented May 23, 2025

This PR fixes a serious bug in the Multirotor Autotune where we break the primary rule "Gains are only changed from default (I excepted) during the twitch".

The code is set up such that when a test step = ABORT; is changed the gains are not changed immediately but instead on the next loop. When we also set mode = FAILED; we don't run the next loop.

This is where we set mode to FAILED:

This is why the loop doesn't run again:

if (pilot_override || mode != TUNING) {

@tridge
Copy link
Contributor

tridge commented May 23, 2025

@lthall thanks for the angle P limit reduction for quadplanes! I do think it should be a parameter though. We've seen copters gets hugely excessive angle P which causes issues

@lthall lthall force-pushed the 20250522_Autotune_Fix branch from 3bf8b41 to 86d983d Compare May 23, 2025 02:15
@lthall lthall force-pushed the 20250522_Autotune_Fix branch 2 times, most recently from c8df092 to 89952b9 Compare May 24, 2025 10:15
@lthall lthall requested review from peterbarker and rmackay9 May 26, 2025 01:04
@lthall lthall force-pushed the 20250522_Autotune_Fix branch from 89952b9 to 4f09753 Compare May 26, 2025 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Pending
Development

Successfully merging this pull request may close these issues.

6 participants