From 3122e70a09cd396432de5de4a680fe32834ab0ff Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 17 Aug 2024 06:43:27 +1000 Subject: [PATCH] AP_Scripting: added TECS tuning to revert param script --- libraries/AP_Scripting/applets/revert_param.lua | 9 +++++++++ libraries/AP_Scripting/applets/revert_param.md | 1 + 2 files changed, 10 insertions(+) diff --git a/libraries/AP_Scripting/applets/revert_param.lua b/libraries/AP_Scripting/applets/revert_param.lua index c92d1e5cc62a2..009c4c72b8d77 100644 --- a/libraries/AP_Scripting/applets/revert_param.lua +++ b/libraries/AP_Scripting/applets/revert_param.lua @@ -64,6 +64,10 @@ 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" } +-- TECS params +TECS_PARAMS = { "TECS_APPR_SMAX", "TECS_CLMB_MAX", "TECS_FLARE_HGT", "TECS_HDEM_TCONST", "TECS_HGT_OMEGA", "TECS_INTEG_GAIN", "TECS_LAND_ARSPD", "TECS_LAND_DAMP", "TECS_LAND_IGAIN", "TECS_LAND_PDAMP", "TECS_LAND_PMAX", "TECS_LAND_SINK", "TECS_LAND_SPDWGT", "TECS_LAND_SRC", "TECS_LAND_TCONST", "TECS_LAND_TDAMP", "TECS_LAND_THR", "TECS_OPTIONS", "TECS_PITCH_MAX", "TECS_PITCH_MIN", "TECS_PTCH_DAMP", "TECS_PTCH_FF_K", "TECS_PTCH_FF_V0", "TECS_RLL2THR", "TECS_SINK_MAX", "TECS_SINK_MIN", "TECS_SPDWEIGHT", "TECS_SPD_OMEGA", "TECS_SYNAIRSPEED", "TECS_THR_DAMP", "TECS_TIME_CONST", "TECS_TKOFF_IGAIN", "TECS_VERT_ACC" } + + if PREV_ENABLE:get() == 0 then return end @@ -117,6 +121,11 @@ for _, psc in ipairs(PSC_prefixes) do end end +-- add in TECS parameters +for _, p in ipairs(TECS_PARAMS) do + add_param(p) +end + -- add in other parameters for _, p in ipairs(OTHER_PARAMS) do add_param(p) diff --git a/libraries/AP_Scripting/applets/revert_param.md b/libraries/AP_Scripting/applets/revert_param.md index 8b1aafbfdd6f7..7d27cee978ce7 100644 --- a/libraries/AP_Scripting/applets/revert_param.md +++ b/libraries/AP_Scripting/applets/revert_param.md @@ -75,3 +75,4 @@ For fixed wing the following parameters are covered: - PTCH_RATE_* - RLL2SRV_TCONST - PTCH2SRV_TCONST + - all TECS parameters