Skip to content

Commit 174534a

Browse files
demvladhaslinghuis
andauthored
Add AUTOPILOT_POSITION and OPTICALFLOW debug modes (#4284)
* Updated debug modes list. The OPTICALFLOW, AUTOPILOT_POSITION debugs are added * Added debug fields names for OPTICALFLOW and AUTOPILOT_POSITION debugs * Optical flow debug caption is edited Co-authored-by: Mark Haslinghuis <[email protected]> * Autopilot debug fields caption is edited Co-authored-by: Mark Haslinghuis <[email protected]> --------- Co-authored-by: Mark Haslinghuis <[email protected]>
1 parent ab4bcad commit 174534a

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/js/debug.js

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,8 @@ function update() {
821821
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
822822
DEBUG.modes.splice(DEBUG.modes.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
823823
DEBUG.modes.splice(DEBUG.modes.indexOf('GYRO_SCALED'), 1);
824-
824+
DEBUG.modes.splice(DEBUG.modes.indexOf('RANGEFINDER_QUALITY') + 1, 0, 'OPTICALFLOW');
825+
DEBUG.modes.push('AUTOPILOT_POSITION');
825826
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
826827
delete DEBUG.fieldNames.GYRO_SCALED;
827828

@@ -859,6 +860,28 @@ function update() {
859860
'debug[5]': 'TPA Argument (Wing)',
860861
};
861862

863+
DEBUG.fieldNames.OPTICALFLOW = {
864+
'debug[all]': 'Optical Flow',
865+
'debug[0]': 'Quality',
866+
'debug[1]': 'Raw flow rates X',
867+
'debug[2]': 'Raw flow rates Y',
868+
'debug[3]': 'Processed flow rates X',
869+
'debug[4]': 'Processed flow rates Y',
870+
'debug[5]': 'Delta time',
871+
};
872+
873+
DEBUG.fieldNames.AUTOPILOT_POSITION = {
874+
'debug[all]': 'Autopilot Position',
875+
'debug[0]': 'Distance',
876+
'debug[1]': 'GPS Distance',
877+
'debug[2]': 'PID Sum EF',
878+
'debug[3]': 'Angle',
879+
'debug[4]': 'pidP',
880+
'debug[5]': 'pidI',
881+
'debug[6]': 'pidD',
882+
'debug[7]': 'pidA',
883+
};
884+
862885
DEBUG.enableFields.splice(DEBUG.enableFields.indexOf("Gyro") + 1, 0, "Attitude");
863886
DEBUG.enableFields.push("Servo");
864887
}

0 commit comments

Comments
 (0)