mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-22 22:50:49 +08:00
It only matters when working under src/drivers/, which the scoped file already covers, and AGENTS.md is loaded for every task. The section was also not wrapped like the rest of AGENTS.md. Assisted-by: Claude:claude-opus-5-5
15 lines
660 B
Markdown
15 lines
660 B
Markdown
---
|
|
applyTo: "src/drivers/**,src/modules/cyphal/**"
|
|
---
|
|
|
|
# Drivers/CAN Review Guidelines
|
|
|
|
In addition to the core code review guidelines:
|
|
|
|
- CAN bus devices behave differently from serial/SPI; check driver assumptions
|
|
- ESC index mapping: telemetry index != channel when motors are disabled
|
|
- ESC hardware quirks: 4-in-1 ESCs may report current on only one channel
|
|
- Verify device_id correctness and I2CSPIDriver patterns
|
|
- Time representation: prefer `hrt_abstime` over iteration counts
|
|
- Code shared by several drivers of one type goes in `src/lib/<topic>/` (e.g. `src/lib/rc/`); `src/drivers/<type>/` holds only per-driver directories, no loose `.cpp`/`.h`
|