Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AUTOPILOT_POSITION and OPTICALFLOW debug modes #4284

Merged
merged 4 commits into from
Dec 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion src/js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,8 @@ function update() {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_47)) {
DEBUG.modes.splice(DEBUG.modes.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
DEBUG.modes.splice(DEBUG.modes.indexOf('GYRO_SCALED'), 1);

DEBUG.modes.splice(DEBUG.modes.indexOf('RANGEFINDER_QUALITY') + 1, 0, 'OPTICALFLOW');
DEBUG.modes.push('AUTOPILOT_POSITION');
delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
delete DEBUG.fieldNames.GYRO_SCALED;

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

DEBUG.fieldNames.OPTICALFLOW = {
'debug[all]': 'Debug OPTICALFLOW',
demvlad marked this conversation as resolved.
Show resolved Hide resolved
'debug[0]': 'Quality',
'debug[1]': 'Raw flow rates X',
'debug[2]': 'Raw flow rates Y',
'debug[3]': 'Processed flow rates X',
'debug[4]': 'Processed flow rates Y',
'debug[5]': 'Delta time',
};

DEBUG.fieldNames.AUTOPILOT_POSITION = {
'debug[all]': 'Autopilot Position',
'debug[0]': 'Distance',
'debug[1]': 'GPS Distance',
'debug[2]': 'PID Sum EF',
'debug[3]': 'Autopilot Angle',
demvlad marked this conversation as resolved.
Show resolved Hide resolved
'debug[4]': 'pidP',
'debug[5]': 'pidI',
'debug[6]': 'pidD',
'debug[7]': 'pidA',
};

DEBUG.enableFields.splice(DEBUG.enableFields.indexOf("Gyro") + 1, 0, "Attitude");
DEBUG.enableFields.push("Servo");
}
Expand Down