Skip to content

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

Open
daijoubu wants to merge 1 commit 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 1 commit 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

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Wrong voltage setting values 🐞 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 🐞 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 add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

save
```

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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Wrong voltage setting values 🐞 Bug ≡ Correctness

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.
Agent Prompt
## 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

---

DroneCAN (formerly UAVCAN v0) is a lightweight protocol designed for reliable communication in aerospace and robotic applications over a CAN bus.
INAV supports DroneCAN for connecting external sensors and peripherals such as battery monitors and GNSS receivers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Dronecan support pages conflict 🐞 Bug ≡ Correctness

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.
Agent Prompt
## 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

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