Skip to content

HardwareReport: show vehicle, frame and configured outputs - #369

Open
j-w9 wants to merge 1 commit into
ArduPilot:mainfrom
j-w9:hardware-report-vehicle
Open

j-w9 wants to merge 1 commit into
ArduPilot:mainfrom
j-w9:hardware-report-vehicle

Conversation

@j-w9

@j-w9 j-w9 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #242.

  • Vehicle section (after Flight Controller): vehicle from the log's build type, plus the frame params with value names (FRAME_CLASS/FRAME_TYPE for Copter and Rover, Q_FRAME_CLASS/Q_FRAME_TYPE for QuadPlane, FRAME_CONFIG for Sub). Plane shows "QuadPlane" when Q_ENABLE is set, with "tilt-rotor" / "tailsitter" from Q_TILT_ENABLE / Q_TAILSIT_ENABLE.
  • Outputs section (after DroneCAN devices): each SERVOn_FUNCTION that is not disabled, with its name. An extra column shows outputs also sent as DroneCAN ESC or servo (CAN_Dx_UC_ESC_BM / CAN_Dx_UC_SRV_BM), counting only drivers assigned to a port (CAN_Px_DRIVER) with CAN_Dx_PROTOCOL = DroneCAN. The column is hidden when nothing is on CAN.

Value names are in a new param_values.json, taken from the current apm.pdef.json for Copter, Plane, Rover and Sub, plus output function names for Antenna Tracker and Blimp. Function names are kept per vehicle because a few differ (e.g. Plane's Motor7/TailTiltServo). A param file has no vehicle type, so it only gets the Outputs section, using the generic names.

Checked on two Copter logs. The Plane, QuadPlane (tilt and tailsitter), Rover, Sub and CAN cases were checked by calling the functions with test params, as I have no logs for those.

Vehicle and outputs

@AP-Review

AP-Review commented Oct 24, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-24)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 03d705fd86.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/369/1.html#prWebTools-369

The new Vehicle and Outputs sections work for the common Copter, Plane, Rover and Sub cases, and the value tables match ArduPilot's parameter metadata, but a few things should be fixed first.

Should fix

  • HardwareReport/HardwareReport.js:3841: if param_values.json fails to load or isn't valid JSON, initial_load() rejects, import_done[2] never resolves, and log loading and Open In hang for good. Add a .catch() that keeps the empty table so the numeric fallbacks take over.
  • HardwareReport/HardwareReport.js:1705: heli firmware logs VER.BU = 13 (APM_BUILD_Heli), which is missing here, so heli logs get no Vehicle/frame section. Add 13: { key: "ArduCopter", name: "Helicopter" }.
Minor (2)
  • HardwareReport/HardwareReport.js:1774: Tracker and Blimp are known build types with no table in param_values.json, so every output shows Unknown (n). Fall back to the merged table when the key is missing.
  • HardwareReport/HardwareReport.js:1815: the "Also sent over CAN" column trusts the raw mask bit. GPIO (-1) outputs and ESC bits below CAN_Dn_UC_ESC_OF are never sent by the firmware but are still labelled as CAN.

@j-w9
j-w9 force-pushed the hardware-report-vehicle branch from 03d705f to 052e532 Compare October 24, 2026 17:05
@AP-Review

AP-Review commented Oct 24, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-24)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 052e5325c8.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/369/2.html#prWebTools-369

No blocking issues at 052e5325c8, just three minor display nits.
Since the last review at 03d705fd86, all four earlier points have been fixed. A failed param_values.json load no longer hangs startup, heli build 13 is mapped, Tracker and Blimp fall back to the merged names, and the CAN column skips GPIO outputs and ESCs below UC_ESC_OF.

Minor (3)
  • HardwareReport/HardwareReport.js:1820: the ESC check has a lower UC_ESC_OF bound but no upper one. SRV_send_esc packs at most 20 ESCs from the offset, so with offset 0 an ESC on output 21 or above is labelled "DroneCAN ESC" but is never sent. Also require (i - 1) < driver.esc_offset + 20.
  • HardwareReport/HardwareReport.js:1780: Tracker's default output functions 71 (TrackerYaw) and 72 (TrackerPitch) are in none of the param_values.json tables, so a normal Tracker setup still shows Unknown (71) and Unknown (72). Adding an AntennaTracker SERVO_FUNCTION table would fix it.
  • HardwareReport/HardwareReport.js:1739: traditional heli (FRAME_CLASS 6 and 11) shows FRAME_TYPE: X, which those frames ignore. Optionally skip FRAME_TYPE for them. Keep it for Tri (6 means reversed pitch) and HeliQuad (H/X).

@j-w9
j-w9 force-pushed the hardware-report-vehicle branch from 052e532 to 13c31ff Compare October 24, 2026 19:49
@AP-Review

AP-Review commented Oct 24, 2026 •

Copy link
Copy Markdown

Deprecated — see below for the updated review.

Previous review (2026-10-24)

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: COMMENT

Reviewed at head 13c31ffe28.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/369/3.html#prWebTools-369

No blocking issues at 13c31ffe28, just one minor display nit.
Since the last review at 052e5325c8, all three earlier nits are fixed: the ESC CAN label now has the 20-ESC upper bound, Tracker functions 71 and 72 have names, and single and dual heli no longer show FRAME_TYPE.

Minor (1)
  • HardwareReport/HardwareReport.js:1827: with CAN_Dn_UC_OPTION bit 6 (UseHimarkServo) set, the firmware sends servos with SRV_send_himark, which only covers outputs 1-17, but a UC_SRV_BM bit on output 18 or above is still labelled "DroneCAN servo". Read UC_OPTION and skip or qualify the label above output 17 in Himark mode.

@j-w9
j-w9 force-pushed the hardware-report-vehicle branch from 13c31ff to ca75390 Compare October 24, 2026 22:51
@AP-Review

Copy link
Copy Markdown

Automated review note — AI-generated (Claude+Codex), validated against the live diff. Please sanity-check before acting.
Verdict: ACCEPT

Reviewed at head ca753901bf.
Full report: https://firmware.ardupilot.org/Tools/APReview/DevCallReviews/PRReviews/ardupilot/webtools/369/4.html#prWebTools-369

No blocking or actionable issues at ca753901; this looks ready to merge.
Since the last review at 13c31ffe28, the Himark nit is fixed: servo bits above output 17 are no longer labelled as sent over CAN when UC_OPTION bit 6 is set, matching SRV_send_himark.

Minor (1)
  • HardwareReport/HardwareReport.js:1829: note only, no change needed. On a custom build over 1 MB without HimarkServo, a leftover UseHimarkServo bit is ignored by the firmware, so servo outputs 18 and up are still sent but no longer labelled. This needs a misconfigured build and is fine to leave.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HardwareReport: show configuration of vehicle and output pins

4 participants