Skip to content

Incorrect struct field dimension parsing #40

@Fabbro03

Description

@Fabbro03

After further investigation, this turned out to be a different issue than initially assumed.

The problem is not related to the calibration logic itself, but to how the derive macro parses the TokenStream when the struct is generated via macro_rules!. In the macro-expanded case, the field type arrives wrapped in an extra Group { delimiter: None }, which is currently not handled by generate_type_description_impl.

This causes all calibrations (except axes) to be emitted as VALUE in the A2L. When the expanded macro code is copied directly into the source, the issue disappears, which confirmed the parsing discrepancy.

I’ve updated the parsing logic to handle this case and will open a PR shortly.

Closing #39 as the original analysis and workaround were misleading.

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