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

AP_Scripting: allow revert of angular rate limits #26881

Merged
merged 1 commit into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libraries/AP_Scripting/applets/revert_param.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ local PSC_prefixes = { "PSC", "Q_P" }
local PID_prefixes = { "_RAT_RLL_", "_RAT_PIT_", "_RAT_YAW_" }
local PID_suffixes = { "FF", "P", "I", "D", "D_FF", "PDMX", "NEF", "NTF", "IMAX", "FLTD", "FLTE", "FLTT", "SMAX" }
local angle_axes = { "RLL", "PIT", "YAW" }
local rate_limit_axes = { "R", "P", "Y"}
local PSC_types = { "ACCZ", "VELZ", "POSZ", "VELXY", "POSXY" }
local OTHER_PARAMS = { "INS_GYRO_FILTER", "INS_ACCEL_FILTER", "PTCH2SRV_TCONST", "RLL2SRV_TCONST" }

Expand Down Expand Up @@ -89,6 +90,13 @@ for _, atc in ipairs(ATC_prefixes) do
end
end

-- add angular rate limits
for _, atc in ipairs(ATC_prefixes) do
for _, axis in ipairs(rate_limit_axes) do
add_param(atc .. "_RATE_" .. axis .. "_MAX")
end
end

-- add fixed wing tuning
for _, suffix in ipairs(PID_suffixes) do
add_param("RLL_RATE_" .. suffix)
Expand Down
2 changes: 2 additions & 0 deletions libraries/AP_Scripting/applets/revert_param.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ The script covers the following parameters on quadplanes:
- Q_A_ANG_RLL_P
- Q_A_ANG_PIT_P
- Q_A_ANG_YAW_P
- Q_A_RATE_*_MAX
- Q_P_ACCZ_*
- Q_P_VELZ_*
- Q_P_POSZ_*
Expand All @@ -61,6 +62,7 @@ The script covers the following parameters on copters:
- ATC_ANG_RLL_P
- ATC_ANG_PIT_P
- ATC_ANG_YAW_P
- ATC_RATE_*_MAX
- PSC_ACCZ_*
- PSC_VELZ_*
- PSC_POSZ_*
Expand Down
Loading