Skip to content
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

AC_Autotune: Clean up Multi Variables and non functional changes #27370

Merged
merged 2 commits into from
Jul 26, 2024

Conversation

lthall
Copy link
Contributor

@lthall lthall commented Jun 24, 2024

I have moved the multi only variable declaration variables into the AC_AutoTune_Multi.h.

I removed the "f" from the floats.

I simplified a couple functions.

All these changes should be non-functional.

I am a little disgusted by some of the structures that I made here. This still has some work to do before it could be considered "clean".

@lthall lthall force-pushed the 20240624_Autotune_Clean_Up branch from 62b61bb to 36c3f3a Compare July 21, 2024 13:11
@lthall lthall force-pushed the 20240624_Autotune_Clean_Up branch from 36c3f3a to 17c9baf Compare July 22, 2024 05:57
float start_angle; // start angle
float start_rate; // start rate - parent and multi
float rate_max; // maximum rate variable - parent and multi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somewhat surprisingly AC_AutoTune_Heli also defines a "rate_max" variable but it is a parameter. I'm slightly surprised that the compiler didn't catch this "shadowing" but in any case it's good to get rid of it.

I think @bnsgeyer should confirm that Heli autotune seems to work OK

@lthall lthall force-pushed the 20240624_Autotune_Clean_Up branch from 17c9baf to 04a0bd0 Compare July 26, 2024 02:32
@peterbarker peterbarker merged commit bb1758e into ArduPilot:master Jul 26, 2024
93 checks passed
lthall added a commit to lthall/Leonard_ardupilot that referenced this pull request Aug 6, 2024
peterbarker pushed a commit that referenced this pull request Aug 6, 2024
tpwrules added a commit to tpwrules/ardupilot that referenced this pull request Dec 4, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in a dangerously low value
being calculated and the vehicle being unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
tpwrules added a commit to tpwrules/ardupilot that referenced this pull request Dec 4, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
rmackay9 pushed a commit that referenced this pull request Dec 5, 2024
Issue introduced in #27370
and partially fixed in #27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
andyp1per pushed a commit to andyp1per/ardupilot that referenced this pull request Dec 7, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
andyp1per pushed a commit to andyp1per/ardupilot that referenced this pull request Dec 7, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
tridge pushed a commit to tridge/ardupilot that referenced this pull request Dec 11, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
tridge pushed a commit that referenced this pull request Dec 12, 2024
Issue introduced in #27370
and partially fixed in #27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
Yury-MonZon pushed a commit to Yury-MonZon/ardupilot that referenced this pull request Dec 12, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
Yury-MonZon pushed a commit to Yury-MonZon/ardupilot that referenced this pull request Dec 12, 2024
Issue introduced in ArduPilot#27370
and partially fixed in ArduPilot#27762,
though evidently not properly tested.

Failing to track the maximum can result in dangerously low values being
calculated for `ATC_ACCEL_[RPY]_MAX` and the vehicle becoming unflyable.

Make the variable a reference so that the maximum value is preserved
between function calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants