Skip to content
Closed
Changes from all 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
5 changes: 4 additions & 1 deletion src/js/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ const DEBUG = {
"TASK",
"GIMBAL",
"WING_SETPOINT",
"DEBUG_AUTOPILOT",
"CHIRP",
"FLASH_TEST_PRBS",
],
Comment on lines +104 to 107
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

New modes added: missing labels for DEBUG_AUTOPILOT

DEBUG_AUTOPILOT has no fieldNames mapping, so the UI will show generic labels or break grouping.

Add a mapping (place alongside other 1.47+ mappings):

// e.g., after AUTOPILOT_POSITION in the 1.47 block
DEBUG.fieldNames.DEBUG_AUTOPILOT = {
  "debug[all]": "Autopilot",
  "debug[0]": "State",
  "debug[1]": "Error",
  "debug[2]": "P",
  "debug[3]": "I",
  "debug[4]": "D",
  "debug[5]": "F",
  "debug[6]": "Setpoint",
  "debug[7]": "Measurement",
};

Run to confirm coverage for the new modes:


🏁 Script executed:

#!/bin/bash
# Verify fieldNames exist for new modes
rg -n 'DEBUG_AUTOPILOT|CHIRP|FLASH_TEST_PRBS' src/js/debug.js
rg -n 'fieldNames\.(DEBUG_AUTOPILOT|CHIRP|FLASH_TEST_PRBS)|fieldNames\["(DEBUG_AUTOPILOT|CHIRP|FLASH_TEST_PRBS)"\]' src/js/debug.js

Length of output: 246


Add missing DEBUG_AUTOPILOT fieldNames mapping

DEBUG_AUTOPILOT is listed under DEBUG.modes but has no corresponding DEBUG.fieldNames.DEBUG_AUTOPILOT block, so UI labels will fall back to generic values. Add it alongside the other 1.47+ mappings, for example:

// after AUTOPILOT_POSITION in the 1.47 block
DEBUG.fieldNames.DEBUG_AUTOPILOT = {
  "debug[all]":           "Autopilot",
  "debug[0]":             "State",
  "debug[1]":             "Error",
  "debug[2]":             "P",
  "debug[3]":             "I",
  "debug[4]":             "D",
  "debug[5]":             "F",
  "debug[6]":             "Setpoint",
  "debug[7]":             "Measurement",
};
🤖 Prompt for AI Agents
In src/js/debug.js around lines 104 to 107, DEBUG.modes includes
"DEBUG_AUTOPILOT" but there is no corresponding DEBUG.fieldNames.DEBUG_AUTOPILOT
mapping, so UI labels fall back to generic values; add a new
DEBUG.fieldNames.DEBUG_AUTOPILOT block in the 1.47+ mappings (place it after
AUTOPILOT_POSITION) with keys "debug[all]", "debug[0]" through "debug[7]" and
values "Autopilot", "State", "Error", "P", "I", "D", "F", "Setpoint", and
"Measurement" respectively to match other mode mappings.


fieldNames: {
Expand Down Expand Up @@ -854,7 +857,7 @@ function update() {

delete DEBUG.fieldNames.GPS_RESCUE_THROTTLE_PID;
delete DEBUG.fieldNames.GYRO_SCALED;

DEBUG.fieldNames["MULTI_GYRO_RAW"] = DEBUG.fieldNames.DUAL_GYRO_RAW;
DEBUG.fieldNames["MULTI_GYRO_DIFF"] = DEBUG.fieldNames.DUAL_GYRO_DIFF;
DEBUG.fieldNames["MULTI_GYRO_SCALED"] = DEBUG.fieldNames.DUAL_GYRO_SCALED;
Expand Down