Skip to content

Initial review #1

@pavel-kirienko

Description

@pavel-kirienko

The TX queue is too large, risking OOM:

let mut queue = unsafe { canardTxInit(10000, CANARD_MTU_CAN_CLASSIC as usize, mem) };

80 frames will suffice for this application.

The transfer-ID type can be narrowed to u8.

The device needs to configure not only the publisher/subscriber registers, but also the application configuration registers as mentioned on the forum. They are currently provided as a YAML file but you can easily translate that into harcoded Rust statements using an LLM.

I see that embedded-alloc provides two strategies: TLSF and first-fit, with TLSF being the default. May I suggest we switch to the first-fit instead? It is expected to offer a lower worst-case fragmentation bound and a much lower ROM footprint. The cost is the O(n) allocation complexity, but it won't matter in this application. (more on allocation strategies: https://github.com/pavel-kirienko/o1heap?tab=readme-ov-file#theory)

The functions in telemetry.rs split concerns in a weird way 🥲

What is the expected behavior if there are other nodes on the network aside from the AmpDrive?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions