Skip to content

Conversation

@tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Jul 28, 2024

This system saves over 9K flash on Cube Orange, over 5K flash on Pixhawk1-1M, and 250-2000 bytes across MatekL431-based peripherals. DroneCAN-enabled bootloaders do not seem to profit however, so this should be disabled for them (still needs to be done).

be sure to update submodules

Did some light performance testing using --enable-stats and @SYS/threads.txt (with increased printing precision). On Cube Orange, with one node connected, the DroneCAN thread CPU usage goes from 2.59% without this PR to 2.63% with. If I then set CAN_D1_UC_ESC_BM to 15 and CAN_D1_UC_SRV_BM to 240 to get some good traffic (~600FPS), then the CPU usage changes from 3.25% without this PR to 3.33% with. So overall a 0.08% increase in CPU usage, or a 12% increase on the thread relative to the less active baseline. Both seem eminently reasonable for the savings.

Tested using the dronecan_dsdlc test scripts and Ardupilot SITL. Also bench tested in various scenarios. Not flown it on anything yet.

Brings in these two PRs:

@tpwrules tpwrules added the CAN label Jul 28, 2024
@tpwrules tpwrules marked this pull request as draft July 28, 2024 20:32
@tpwrules
Copy link
Contributor Author

Drafted until those two PRs get merged and we have final hashes for them.

@tpwrules
Copy link
Contributor Author

Passed some basic smoke tests using a serial GPS connected to CubeOrange-periph connected to CubeRedPrimary. Tested old/new code on one/both nodes, and tested CANFD support.

@tpwrules tpwrules force-pushed the pr/dronecan-table-coding branch 2 times, most recently from ac1f5a8 to f3664c2 Compare September 17, 2024 01:32
@tridge
Copy link
Contributor

tridge commented Nov 5, 2025

I think a waf configure --disable-can-table-coding would be worthwhile to help debug potential regressions

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.

2 participants