From 16ecbac14d13d3c01051fc7c8fa00e6687dc8315 Mon Sep 17 00:00:00 2001 From: demvlad Date: Mon, 23 Dec 2024 21:51:19 +0300 Subject: [PATCH 1/4] Updated debug modes list. The OPTICALFLOW, AUTOPILOT_POSITION debugs are added --- src/js/debug.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index f342b95ba6..993f424b38 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -821,7 +821,8 @@ function update() { if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) { DEBUG.modes.splice(DEBUG.modes.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE'); DEBUG.modes.splice(DEBUG.modes.indexOf('GYRO_SCALED'), 1); - + DEBUG.modes.splice(DEBUG.modes.indexOf('RANGEFINDER_QUALITY') + 1, 0, 'OPTICALFLOW'); + DEBUG.modes.push('AUTOPILOT_POSITION'); delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID; delete DEBUG.fieldNames.GYRO_SCALED; From 43430fafba68dd29a9e29c25b6318da9f05897f2 Mon Sep 17 00:00:00 2001 From: demvlad Date: Mon, 23 Dec 2024 23:15:39 +0300 Subject: [PATCH 2/4] Added debug fields names for OPTICALFLOW and AUTOPILOT_POSITION debugs --- src/js/debug.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/js/debug.js b/src/js/debug.js index 993f424b38..63b6b8344e 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -860,6 +860,28 @@ function update() { 'debug[5]': 'TPA Argument (Wing)', }; + DEBUG.fieldNames.OPTICALFLOW = { + 'debug[all]': 'Debug OPTICALFLOW', + 'debug[0]': 'Quality', + 'debug[1]': 'Raw flow rates X', + 'debug[2]': 'Raw flow rates Y', + 'debug[3]': 'Processed flow rates X', + 'debug[4]': 'Processed flow rates Y', + 'debug[5]': 'Delta time', + }; + + DEBUG.fieldNames.AUTOPILOT_POSITION = { + 'debug[all]': 'Autopilot Position', + 'debug[0]': 'Distance', + 'debug[1]': 'GPS Distance', + 'debug[2]': 'PID Sum EF', + 'debug[3]': 'Autopilot Angle', + 'debug[4]': 'pidP', + 'debug[5]': 'pidI', + 'debug[6]': 'pidD', + 'debug[7]': 'pidA', + }; + DEBUG.enableFields.splice(DEBUG.enableFields.indexOf("Gyro") + 1, 0, "Attitude"); DEBUG.enableFields.push("Servo"); } From 4c169a7e78d8991be0d827af4753536fc1fc502d Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Mon, 23 Dec 2024 23:20:17 +0300 Subject: [PATCH 3/4] Optical flow debug caption is edited Co-authored-by: Mark Haslinghuis --- src/js/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index 63b6b8344e..345efa45ac 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -861,7 +861,7 @@ function update() { }; DEBUG.fieldNames.OPTICALFLOW = { - 'debug[all]': 'Debug OPTICALFLOW', + 'debug[all]': 'Optical Flow', 'debug[0]': 'Quality', 'debug[1]': 'Raw flow rates X', 'debug[2]': 'Raw flow rates Y', From 31d50ef7018fa3624ed91e4f701eb1a3af07a6d8 Mon Sep 17 00:00:00 2001 From: Vladimir Demidov Date: Mon, 23 Dec 2024 23:21:12 +0300 Subject: [PATCH 4/4] Autopilot debug fields caption is edited Co-authored-by: Mark Haslinghuis --- src/js/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index 345efa45ac..fd986676e2 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -875,7 +875,7 @@ function update() { 'debug[0]': 'Distance', 'debug[1]': 'GPS Distance', 'debug[2]': 'PID Sum EF', - 'debug[3]': 'Autopilot Angle', + 'debug[3]': 'Angle', 'debug[4]': 'pidP', 'debug[5]': 'pidI', 'debug[6]': 'pidD',