Skip to content

Commit 521b388

Browse files
authored
Update TPA debug (Wing) (#4211)
* Update TPA debug (Wing) * Update throttle * [chore] refactor order
1 parent 81660ed commit 521b388

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

src/js/debug.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,12 @@ function update() {
799799
}
800800

801801
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
802+
DEBUG.modes.splice(DEBUG.modes.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
803+
DEBUG.modes.splice(DEBUG.modes.indexOf('GYRO_SCALED'), 1);
804+
805+
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
806+
delete DEBUG.fieldNames.GYRO_SCALED;
807+
802808
DEBUG.fieldNames.FFT_FREQ = {
803809
'debug[all]': 'Debug FFT FREQ',
804810
'debug[0]': 'Gyro Pre Dyn Notch [dbg-axis]',
@@ -810,18 +816,6 @@ function update() {
810816
'debug[6]': 'Notch 6 Center Freq [dbg-axis]',
811817
'debug[7]': 'Notch 7 Center Freq [dbg-axis]',
812818
};
813-
DEBUG.fieldNames.TPA = {
814-
'debug[all]': 'TPA',
815-
'debug[0]': 'TPA Factor',
816-
'debug[1]': 'TPA Pitch Angle Factor (Wing)',
817-
'debug[2]': 'TPA Argument (Wing)',
818-
};
819-
820-
DEBUG.modes.splice(DEBUG.modes.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
821-
DEBUG.modes.splice(DEBUG.modes.indexOf('GYRO_SCALED'), 1);
822-
823-
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
824-
delete DEBUG.fieldNames.GYRO_SCALED;
825819

826820
DEBUG.fieldNames.AUTOPILOT_ALTITUDE = {
827821
'debug[all]': 'Autopilot Altitude',
@@ -834,6 +828,17 @@ function update() {
834828
'debug[6]': 'Altitude D',
835829
'debug[7]': 'Altitude F',
836830
};
831+
832+
DEBUG.fieldNames.TPA = {
833+
'debug[all]': 'TPA',
834+
'debug[0]': 'TPA Factor',
835+
'debug[1]': 'TPA Attitude Roll (Wing)',
836+
'debug[2]': 'TPA Attitude Pitch (Wing)',
837+
'debug[3]': 'TPA Calculated Throttle (Wing)',
838+
'debug[4]': 'TPA Speed (Wing)',
839+
'debug[5]': 'TPA Argument (Wing)',
840+
};
841+
837842
DEBUG.enableFields.splice(DEBUG.enableFields.indexOf("Gyro"), 0, "Attitude");
838843
}
839844
}

0 commit comments

Comments
 (0)