Skip to content

docs: add DroneCAN overview page and document as GPS/battery source - #17

Open
daijoubu wants to merge 4 commits into
iNavFlight:masterfrom
daijoubu:feat/docs-dronecan-phase3
Open

docs: add DroneCAN overview page and document as GPS/battery source#17
daijoubu wants to merge 4 commits into
iNavFlight:masterfrom
daijoubu:feat/docs-dronecan-phase3

Conversation

@daijoubu

@daijoubu daijoubu commented Sep 3, 2026

Copy link
Copy Markdown

Summary

Adds DroneCAN coverage to the docs site ahead of the underlying INAV 10.0 PR stack landing.

New page: docs/06-advanced-features/dronecan.mdx

  • Protocol overview, supported hardware (STM32F7 bxCAN, STM32H7 FDCAN)
  • Full feature matrix (GPS, battery V/I, per-node param GetSet/Restart, DNA server, CAN bus-off blackbox, ESC/actuator/RC-input not yet)
  • Basic configuration: the DroneCAN tab in INAV Configurator is the primary path; CLI is the alternative
  • Node management: GetNodeInfo / GetSet / ExecuteOpcode / RestartNode via the configurator DroneCAN tab, including the per-node restart caveat documented in firmware PR #11683
  • Dynamic Node Allocation server (dronecan_use_dna_server)
  • Blackbox droneCANBusOffCount S-frame field
  • Bus wiring / termination notes, troubleshooting checklist
  • Gated behind "INAV 10.0 or later" for the configurator-tab features; the underlying PRs (#11683, #2671, #11688, #2672, #11729) are out of draft and mergeable but not yet merged

Updated: docs/05-core-features/battery.mdx

  • Documents DroneCAN as a supported battery voltage and current source
  • Adds the full current_meter_type sensor enumeration (None, ADC, Virtual, Fake, ESC, SmartPort, CRSF, DroneCAN) — the existing table listed only 3 of these 8 values
  • Adds a new "Voltage Sensor Source" subsection with the full bat_voltage_src enumeration (None, ADC, ESC, Fake, SmartPort, CRSF, DroneCAN); positions it before the existing RAW vs SAG_COMP processing-mode discussion so readers see the sensor selection step first
  • Cross-link to the new DroneCAN page

Updated: docs/05-core-features/gps.mdx

  • Adds "GNSS via DroneCAN" section covering gps_provider = DRONECAN
  • Notes INAV only supports a single GNSS source at a time
  • Points to the INAV Configurator DroneCAN tab (GetNodeInfo + GetSet) for editing the node's own constellation parameters
  • Links out to the ArduPilot AP_Periph Complete Parameter List for the parameter names the most common DroneCAN GNSS node firmware exposes

Testing

  • npx docusaurus build --no-minify succeeds for all three files (verified locally)
  • All three pages render in the dev server (http://localhost:3000/docs/advanced-features/dronecan, /docs/core-features/battery, /docs/core-features/gps) — verified manually
  • No broken-link or broken-anchor warnings introduced; the existing HTML minifier warnings on hardware-overview.mdx and fw_gettingstartedguide/fwsetup.mdx are pre-existing on master and unrelated
  • Cross-references between the three pages and the existing 06-advanced-features/gps-fix-estimation.mdx resolved

Related

Adds a new DroneCAN overview page under Advanced Features covering
the protocol, supported hardware, CLI configurator tab, node
management (GetNodeInfo, GetSet, ExecuteOpcode, RestartNode), the
DNA server, blackbox bus-off logging, and bus wiring notes.

Documents DroneCAN as a supported GNSS source in the GPS page and
as a supported battery voltage/current source in the Battery
Monitoring page, including the full current_meter_type and
bat_voltage_src sensor enumerations which the existing docs
tables had fallen behind the firmware on.
@daijoubu
daijoubu marked this pull request as ready for review September 3, 2026 18:43
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Document DroneCAN setup, GNSS, and battery telemetry

📝 Documentation 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds a DroneCAN overview covering setup, node management, diagnostics, wiring, and support
 boundaries.
• Documents DroneCAN as a GNSS and synchronized battery telemetry source.
• Completes battery voltage and current sensor source enumerations.
Diagram

graph TD
  Reader["INAV User"] --> Guide["DroneCAN Guide"] --> Setup["Configurator / CLI"] --> FC["Flight Controller"] --> Bus["CAN Bus"] --> Nodes["GNSS / Battery"]
  Guide --> GPS["GPS Guide"]
  Guide --> Battery["Battery Guide"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Defer documentation until INAV 10.0 lands
  • ➕ Prevents published guidance from drifting from final firmware behavior
  • ➕ Allows configuration values and UI workflows to be validated against merged releases
  • ➖ Delays documentation needed by testers and early adopters
  • ➖ Reduces readiness for the INAV 10.0 release
2. Publish only in versioned INAV 10.0 documentation
  • ➕ Keeps unreleased functionality separate from current-version guidance
  • ➕ Provides a clear compatibility boundary for readers
  • ➖ Requires maintaining a release-specific documentation version
  • ➖ May complicate discovery before the versioned site is publicly available

Recommendation: The cross-linked overview plus focused GPS and battery sections provide the best discoverability. Publishing ahead of firmware is reasonable for release preparation, provided the prominent INAV 10.0 caveats remain and the pages are revalidated when the dependent firmware and configurator PRs merge.

Files changed (3) +206 / -2

Documentation (3) +206 / -2
battery.mdxDocument DroneCAN battery voltage and current sources +42/-2

Document DroneCAN battery voltage and current sources

• Adds the complete voltage and current sensor source enumerations, including DroneCAN. Documents configuring synchronized voltage and current telemetry from DroneCAN BatteryInfo messages and links to the overview guide.

docs/05-core-features/battery.mdx

gps.mdxDocument DroneCAN as a GNSS provider +27/-0

Document DroneCAN as a GNSS provider

• Explains selecting a DroneCAN GNSS source, managing receiver parameters through Configurator, and the single-source limitation. Adds AP_Periph parameter guidance and links to general DroneCAN setup.

docs/05-core-features/gps.mdx

dronecan.mdxAdd comprehensive DroneCAN overview +137/-0

Add comprehensive DroneCAN overview

• Introduces supported hardware and features, Configurator and CLI setup, node management, dynamic allocation, blackbox diagnostics, wiring, and troubleshooting guidance. Clearly identifies functionality requiring INAV 10.0 or later.

docs/06-advanced-features/dronecan.mdx

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Wrong voltage setting values ✓ Resolved 🐞 Bug ≡ Correctness
Description
The new text says bat_voltage_src accepts RAW and SAG_COMP, but those values belong to the
separate bat_voltage_source setting. Users following this description may issue invalid
configuration commands or misunderstand source selection versus sag compensation.
Code

docs/05-core-features/battery.mdx[221]

+The `CAN` value for both settings is selected from the same enumerations used for other sources — `bat_voltage_src` accepts `RAW`, `SAG_COMP`, and `CAN`; `current_meter_type` accepts the full set in the table above (None, ADC, Virtual, Fake, ESC, SmartPort, CRSF, DroneCAN).
Evidence
The newly added source table defines bat_voltage_src values as None, ADC, ESC, Fake, SmartPort,
CRSF, and DroneCAN. The immediately following section separately documents RAW and SAG_COMP as
values of bat_voltage_source, proving line 221 conflates two settings.

docs/05-core-features/battery.mdx[41-67]
docs/05-core-features/battery.mdx[207-223]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Correct the DroneCAN battery documentation, which currently assigns `RAW` and `SAG_COMP` to `bat_voltage_src` even though they are values of `bat_voltage_source`.
## Issue Context
`bat_voltage_src` selects the physical sensor source, while `bat_voltage_source` selects raw or sag-compensated voltage processing.
## Fix Focus Areas
- docs/05-core-features/battery.mdx[41-67]
- docs/05-core-features/battery.mdx[207-223]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. DroneCAN support pages conflict ✓ Resolved 🐞 Bug ≡ Correctness
Description
The new page says INAV supports DroneCAN GNSS and battery sensors, while the existing hardware
overview says INAV does not support any DroneCAN sensors. Leaving both statements in the current
documentation gives readers mutually exclusive support guidance.
Code

docs/06-advanced-features/dronecan.mdx[7]

+INAV supports DroneCAN for connecting external sensors and peripherals such as battery monitors and GNSS receivers.
Evidence
The added overview claims DroneCAN battery monitors and GNSS receivers are supported and marks those
capabilities as supported in its feature table. The current hardware overview explicitly states that
INAV does not support any DroneCAN-based sensors yet.

docs/06-advanced-features/dronecan.mdx[6-7]
docs/06-advanced-features/dronecan.mdx[33-43]
docs/03-getting-started/01-hardware-overview.mdx[81-82]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Update the existing hardware overview or qualify the new DroneCAN support claims so the current documentation does not simultaneously state that DroneCAN sensors are supported and unsupported.
## Issue Context
The new overview marks GNSS and battery sources as supported, but the hardware overview still explicitly says INAV supports no DroneCAN-based sensors.
## Fix Focus Areas
- docs/03-getting-started/01-hardware-overview.mdx[81-82]
- docs/06-advanced-features/dronecan.mdx[6-7]
- docs/06-advanced-features/dronecan.mdx[33-43]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Finding overflow, which tucks the rest behind 'View more'

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread docs/05-core-features/battery.mdx Outdated
Comment thread docs/06-advanced-features/dronecan.mdx
Finding 1 (battery.mdx): the Phase 3 DroneCAN section conflated
`bat_voltage_src` with `bat_voltage_source` and showed the wrong
setting name for the 7-value sensor-source table. Per the firmware
(`src/main/fc/settings.yaml`, `docs/Settings.md`), `vbat_meter_type`
selects the physical voltage sensor source (None/ADC/ESC/Fake/
SmartPort/CRSF/DroneCAN) and `bat_voltage_src` selects raw vs
sag-compensated reading (RAW/SAG_COMP). Update the table heading,
intro sentence, DroneCAN example command, and the "CAN value for
both settings" sentence to use `vbat_meter_type` for the sensor
source; keep `bat_voltage_src` as the RAW/SAG_COMP setting.

Finding 2 (dronecan.mdx): the page describes DroneCAN sensor support
in present tense, but the getting-started Hardware Overview page
still says 9.x does not support DroneCAN sensors (true for 9.x,
stale for 10.0). Until the upstream Hardware Overview fix (PR iNavFlight#16)
merges, qualify the page with a top-of-page note pointing to it and
calling out that the page describes INAV 10.0+ behaviour.

docusaurus build clean; pre-existing HTML-minifier warnings on
unrelated files unchanged.

@daijoubu daijoubu left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit 97a63a8. While addressing the conflation, traced the actual CLI setting names against the firmware source (inav/src/main/fc/settings.yaml and inav/docs/Settings.md). The physical voltage sensor source is selected by vbat_meter_type (None/ADC/ESC/Fake/SmartPort/CRSF/DroneCAN), not bat_voltage_src. The Phase 3 table was labeled with the wrong name — fixed the table heading, intro sentence, DroneCAN example command, and the conflating sentence at L221 to use vbat_meter_type for the sensor source and bat_voltage_src only for its actual RAW/SAG_COMP role (with in-page anchor link to the relevant section).

@daijoubu daijoubu left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in commit 97a63a8. Added a top-of-page admonition clarifying that this page describes INAV 10.0+ DroneCAN behaviour and that the getting-started Hardware Overview page still describes 9.x (correct for 9.x, stale for 10.0). The qualification points to the upstream Hardware Overview fix (PR #16) which is still open; once it lands this qualification can be removed in a follow-up edit.

The "Supported features" table on the DroneCAN page recommended
`set bat_voltage_src = CAN` for battery voltage, but per the firmware
(`inav/src/main/fc/settings.yaml`, `inav/docs/Settings.md`)
`bat_voltage_src` only accepts RAW/SAG_COMP. The physical voltage
sensor source is selected by `vbat_meter_type`. Same correction was
applied to the battery.mdx table and DroneCAN example command in
97a63a8; this commit covers the supported-features table on this
same page.
…ource`

The "Voltage Measurement Source" section referred to the
`bat_voltage_source` setting, but per the firmware
(`inav/src/main/fc/settings.yaml`, `inav/docs/Settings.md`) the
actual CLI name is `bat_voltage_src` (no final "e"). The
`bat_voltage_source` string only appears as a YAML table-name
reference; the user-facing setting name has always been
`bat_voltage_src`.

This pre-existing typo was carried forward from the inav/docs wiki
when the new docs site was bootstrapped (robotgoat, 2026-06-06) and
predates the Phase 3 work. Caught while addressing the Qodo
findings on PR iNavFlight#17 (which renamed the sensor-source table from
`bat_voltage_src` to `vbat_meter_type` per the same firmware
source).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant