From 9507c406258fa445d51a95e554360dc9874520d1 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Thu, 31 Oct 2024 21:03:55 +0100 Subject: [PATCH] Fix debug ATTITUDE (#4233) --- src/js/debug.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/js/debug.js b/src/js/debug.js index 2fde788cf8..e6cc5fcf0d 100644 --- a/src/js/debug.js +++ b/src/js/debug.js @@ -1,5 +1,5 @@ import FC from './fc.js'; -import { API_VERSION_1_47 } from './data_storage'; +import { API_VERSION_1_46, API_VERSION_1_47 } from './data_storage'; import semver from "semver"; const DEBUG = { @@ -784,6 +784,20 @@ const DEBUG = { }; function update() { + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) { + DEBUG.fieldNames.ATTITUDE = { + 'debug[all]': 'Attitude', + 'debug[0]': 'Roll Angle', + 'debug[1]': 'Pitch Angle', + 'debug[2]': 'Ground Speed Factor', + 'debug[3]': 'Heading Error', + 'debug[4]': 'Velocity to Home', + 'debug[5]': 'Ground Speed Error Ratio', + 'debug[6]': 'Pitch Forward Angle', + 'debug[7]': 'dcmKp Gain', + }; + } + if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) { DEBUG.fieldNames.FFT_FREQ = { 'debug[all]': 'Debug FFT FREQ',