Skip to content

Commit

Permalink
Add missing debugmodes and fields (betaflight#3646)
Browse files Browse the repository at this point in the history
* Add missing debugmodes and fields

* Update text in setup

* Fix todo
  • Loading branch information
haslinghuis authored and chmelevskij committed Apr 27, 2024
1 parent 6b79495 commit a0e7faf
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 2 deletions.
79 changes: 79 additions & 0 deletions src/js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ const DEBUG = {
{text: "DSHOT_TELEMETRY_COUNTS"},
{text: "RPM_LIMIT"},
{text: "RC_STATS"},
{text: "MAG_CALIB"},
{text: "MAG_TASK_RATE"},
],

fieldNames : {
Expand Down Expand Up @@ -663,6 +665,83 @@ const DEBUG = {
'debug[2]': 'hDOP (horizontal - 2D)',
'debug[3]': 'vDOP (vertical - 1D)',
},
'FAILSAFE' : {
'debug[all]': 'Failsafe',
'debug[0]': 'Failsafe Phase switch',
'debug[1]': 'Failsafe State',
'debug[2]': 'Receiving data from Rx',
'debug[3]': 'Failsafe Phase',
},
'GYRO_CALIBRATION' : {
'debug[all]': 'Gyro Calibration',
'debug[0]': 'Gyro Calibration X',
'debug[1]': 'Gyro Calibration Y',
'debug[2]': 'Gyro Calibration Z',
'debug[3]': 'Calibration Cycles remaining',
},
'ANGLE_MODE' : {
'debug[all]': 'Angle Mode',
'debug[0]': 'Angle Target',
'debug[1]': 'Angle Error',
'debug[2]': 'Angle Feedforward',
'debug[3]': 'Angle Current',
},
'ANGLE_TARGET' : {
'debug[all]': 'Angle Target',
'debug[0]': 'Angle Target',
'debug[1]': 'Sin Angle',
'debug[2]': 'Current PID Setpoint',
'debug[3]': 'Angle Current',
},
'CURRENT_ANGLE' : {
'debug[all]': 'Current Angle',
'debug[0]': 'Current Angle X',
'debug[1]': 'Current Angle Y',
'debug[2]': 'Current Angle Z',
},
'DSHOT_TELEMETRY_COUNTS' : {
'debug[all]': 'DShot Telemetry Counts',
'debug[0]': 'DShot Telemetry Debug[0] + 1',
'debug[1]': 'DShot Telemetry Debug[1] + 1',
'debug[2]': 'DShot Telemetry Debug[2] + 1',
'debug[3]': 'Preamble Skip',
},
'RPM_LIMIT' : {
'debug[all]': 'RPM Limit',
'debug[0]': 'Average RPM',
'debug[1]': 'Average RPM (unsmoothed)',
'debug[2]': 'RPM Limit throttle scale',
'debug[3]': 'Throttle',
'debug[4]': 'Error',
'debug[5]': 'Proportional',
'debug[6]': 'Integral',
'debug[7]': 'Derivative',
},
'RC_STATS' : {
'debug[all]': 'RC Stats',
'debug[0]': 'Average Throttle',
},
'MAG_CALIB' : {
'debug[all]': 'Mag Calibration',
'debug[0]': 'Mag X',
'debug[1]': 'Mag Y',
'debug[2]': 'Mag Z',
'debug[3]': 'Norm / Length of magADC',
'debug[4]': 'Estimated Mag Bias X',
'debug[5]': 'Estimated Mag Bias Y',
'debug[6]': 'Estimated Mag Bias Z',
'debug[7]': 'Mag Bias Estimator',
},
'MAG_TASK_RATE' : {
'debug[all]': 'Mag Task Rate',
'debug[0]': 'Task Rate (Hz)',
'debug[1]': 'Actual Data Rate (Hz)',
'debug[2]': 'Data Interval (Us)',
'debug[3]': 'Execute Time (Us)',
'debug[4]': 'Bus Busy',
'debug[5]': 'Read State',
'debug[6]': 'Task Time (Us)',
},
},

enableFields : [
Expand Down
4 changes: 2 additions & 2 deletions src/js/tabs/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ setup.initialize = function (callback) {
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_46)) {
MSP.send_message(MSPCodes.MSP2_SENSOR_CONFIG_ACTIVE, false, false, function() {
// Sensor info
const textNA = 'N/A';
const textDisabled = 'disabled';
const textNA = 'Not included in build';
const textDisabled = 'Disabled by user';

if (FC.SENSOR_CONFIG_ACTIVE.gyro_hardware == 0xFF) {
sensor_gyro_e.text(textNA);
Expand Down

0 comments on commit a0e7faf

Please sign in to comment.