Skip to content

Commit 747b921

Browse files
authored
Add missing debug modes (#796)
* Add missing debug modes * Also update TPA
1 parent dfd3e4a commit 747b921

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

src/flightlog_fielddefs.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,12 @@ export function adjustFieldDefsList(firmwareType, firmwareVersion) {
529529
if (semver.gte(firmwareVersion, "4.6.0")) {
530530
DEBUG_MODE.splice(DEBUG_MODE.indexOf('GPS_RESCUE_THROTTLE_PID'), 1, 'AUTOPILOT_ALTITUDE');
531531
DEBUG_MODE.splice(DEBUG_MODE.indexOf("GYRO_SCALED"), 1);
532+
DEBUG_MODE.push('TPA');
533+
DEBUG_MODE.push('S_TERM');
534+
DEBUG_MODE.push('SPA');
535+
DEBUG_MODE.push('TASK');
536+
DEBUG_MODE.push('GIMBAL');
537+
DEBUG_MODE.push('WING_SETPOINT');
532538
}
533539

534540
DEBUG_MODE = makeReadOnly(DEBUG_MODE);

src/flightlog_fields_presenter.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,6 +1338,56 @@ FlightLogFieldPresenter.adjustDebugDefsList = function (
13381338
'debug[6]': 'Altitude D',
13391339
'debug[7]': 'Altitude F',
13401340
};
1341+
DEBUG_FRIENDLY_FIELD_NAMES.TPA = {
1342+
'debug[all]': 'TPA',
1343+
'debug[0]': 'TPA Factor',
1344+
'debug[1]': 'TPA Attitude Roll (Wing)',
1345+
'debug[2]': 'TPA Attitude Pitch (Wing)',
1346+
'debug[3]': 'TPA Calculated Throttle (Wing)',
1347+
'debug[4]': 'TPA Speed (Wing)',
1348+
'debug[5]': 'TPA Argument (Wing)',
1349+
};
1350+
DEBUG_FRIENDLY_FIELD_NAMES.S_TERM = {
1351+
'debug[all]': 'S Term',
1352+
'debug[0]': 'S Term [roll]',
1353+
'debug[1]': 'S Term [pitch]',
1354+
'debug[2]': 'S Term [yaw]',
1355+
};
1356+
DEBUG_FRIENDLY_FIELD_NAMES.SPA = {
1357+
'debug[all': 'SPA',
1358+
'debug[0]': 'Setpoint PID Attenuation [roll]',
1359+
'debug[1]': 'Setpoint PID Attenuation [pitch]',
1360+
'debug[2]': 'Setpoint PID Attenuation [yaw]',
1361+
};
1362+
DEBUG_FRIENDLY_FIELD_NAMES.TASK = {
1363+
'debug[all]': 'TASK',
1364+
'debug[0]': 'Value',
1365+
'debug[1]': 'Rate (Hz)',
1366+
'debug[2]': 'Max (us)',
1367+
'debug[3]': 'Average (us)',
1368+
'debug[4]': 'Estimated execution time (us)',
1369+
'debug[5]': 'Actual execution time (us)',
1370+
'debug[6]': 'Difference estimated vs actual',
1371+
'debug[7]': 'Late count',
1372+
};
1373+
DEBUG_FRIENDLY_FIELD_NAMES.GIMBAL = {
1374+
'debug[all]': 'Gimbal',
1375+
'debug[0]': 'Headtracker Roll',
1376+
'debug[1]': 'Headtracker Pitch',
1377+
'debug[2]': 'Headtracker Yaw',
1378+
'debug[3]': 'Gimbal Roll',
1379+
'debug[4]': 'Gimbal Pitch',
1380+
'debug[5]': 'Gimbal Yaw',
1381+
};
1382+
DEBUG_FRIENDLY_FIELD_NAMES.WING_SETPOINT = {
1383+
'debug[all]': 'Wing Setpoint',
1384+
'debug[0]': 'Current Setpoint [roll]',
1385+
'debug[1]': 'Adjusted Setpoint [roll]',
1386+
'debug[2]': 'Current Setpoint [pitch]',
1387+
'debug[3]': 'Adjusted Setpoint [pitch]',
1388+
'debug[4]': 'Current Setpoint [yaw]',
1389+
'debug[5]': 'Adjusted Setpoint [yaw]',
1390+
};
13411391
}
13421392
}
13431393
};

0 commit comments

Comments
 (0)