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 missing debugmodes and fields #3646

Merged
merged 3 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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