Skip to content

Commit

Permalink
Fix debug ATTITUDE (#4233)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored Oct 31, 2024
1 parent 2814e06 commit 9507c40
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/js/debug.js
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 9507c40

Please sign in to comment.