Skip to content

Commit

Permalink
AP_Scripting: allow revert of angular rate limits
Browse files Browse the repository at this point in the history
  • Loading branch information
magate authored and tridge committed May 8, 2024
1 parent 3a1e07d commit a6995c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit a6995c9

Please sign in to comment.