From 01cb1873cf188d8aa298ae2fb4f5887401981686 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Mon, 25 Nov 2024 22:59:53 +0100 Subject: [PATCH 1/2] Add missing debug modes --- src/flightlog_fielddefs.js | 6 +++++ src/flightlog_fields_presenter.js | 45 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/src/flightlog_fielddefs.js b/src/flightlog_fielddefs.js index 1e2f065f..66229108 100644 --- a/src/flightlog_fielddefs.js +++ b/src/flightlog_fielddefs.js @@ -529,6 +529,12 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) { if (semver.gte(firmwareVersion, "4.6.0")) { DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE'); DEBUG_MODE.splice(DEBUG_MODE.indexOf("GYRO_SCALED"), 1); + DEBUG_MODE.push('TPA'); + DEBUG_MODE.push('S_TERM'); + DEBUG_MODE.push('SPA'); + DEBUG_MODE.push('TASK'); + DEBUG_MODE.push('GIMBAL'); + DEBUG_MODE.push('WING_SETPOINT'); } DEBUG_MODE = makeReadOnly(DEBUG_MODE); diff --git a/src/flightlog_fields_presenter.js b/src/flightlog_fields_presenter.js index ed753827..474fa104 100644 --- a/src/flightlog_fields_presenter.js +++ b/src/flightlog_fields_presenter.js @@ -1338,6 +1338,51 @@ FlightLogFieldPresenter.adjustDebugDefsList = function ( 'debug[6]': 'Altitude D', 'debug[7]': 'Altitude F', }; + DEBUG_FRIENDLY_FIELD_NAMES.TPA = { + 'debug[all]': 'TPA', + 'debug[0]': 'TPA Factor', + }; + DEBUG_FRIENDLY_FIELD_NAMES.S_TERM = { + 'debug[all]': 'S Term', + 'debug[0]': 'S Term [roll]', + 'debug[1]': 'S Term [pitch]', + 'debug[2]': 'S Term [yaw]', + }; + DEBUG_FRIENDLY_FIELD_NAMES.SPA = { + 'debug[all': 'SPA', + 'debug[0]': 'Setpoint PID Attenuation [roll]', + 'debug[1]': 'Setpoint PID Attenuation [pitch]', + 'debug[2]': 'Setpoint PID Attenuation [yaw]', + }; + DEBUG_FRIENDLY_FIELD_NAMES.TASK = { + 'debug[all]': 'TASK', + 'debug[0]': 'Value', + 'debug[1]': 'Rate (Hz)', + 'debug[2]': 'Max (us)', + 'debug[3]': 'Average (us)', + 'debug[4]': 'Estimated execution time (us)', + 'debug[5]': 'Actual execution time (us)', + 'debug[6]': 'Difference estimated vs actual', + 'debug[7]': 'Late count', + }; + DEBUG_FRIENDLY_FIELD_NAMES.GIMBAL = { + 'debug[all]': 'Gimbal', + 'debug[0]': 'Headtracker Roll', + 'debug[1]': 'Headtracker Pitch', + 'debug[2]': 'Headtracker Yaw', + 'debug[3]': 'Gimbal Roll', + 'debug[4]': 'Gimbal Pitch', + 'debug[5]': 'Gimbal Yaw', + }; + DEBUG_FRIENDLY_FIELD_NAMES.WING_SETPOINT = { + 'debug[all]': 'Wing Setpoint', + 'debug[0]': 'Current Setpoint [roll]', + 'debug[1]': 'Adjusted Setpoint [roll]', + 'debug[2]': 'Current Setpoint [pitch]', + 'debug[3]': 'Adjusted Setpoint [pitch]', + 'debug[4]': 'Current Setpoint [yaw]', + 'debug[5]': 'Adjusted Setpoint [yaw]', + }; } } }; From f42ddf840626e5431147bf5baa162d4ff806d937 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Mon, 25 Nov 2024 23:13:13 +0100 Subject: [PATCH 2/2] Also update TPA --- src/flightlog_fields_presenter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/flightlog_fields_presenter.js b/src/flightlog_fields_presenter.js index 474fa104..e833100b 100644 --- a/src/flightlog_fields_presenter.js +++ b/src/flightlog_fields_presenter.js @@ -1341,6 +1341,11 @@ FlightLogFieldPresenter.adjustDebugDefsList = function ( DEBUG_FRIENDLY_FIELD_NAMES.TPA = { 'debug[all]': 'TPA', 'debug[0]': 'TPA Factor', + 'debug[1]': 'TPA Attitude Roll (Wing)', + 'debug[2]': 'TPA Attitude Pitch (Wing)', + 'debug[3]': 'TPA Calculated Throttle (Wing)', + 'debug[4]': 'TPA Speed (Wing)', + 'debug[5]': 'TPA Argument (Wing)', }; DEBUG_FRIENDLY_FIELD_NAMES.S_TERM = { 'debug[all]': 'S Term',