technocreatives / dbc-codegen

Generate Rust structs for messages from a dbc (CAN bus definition) file.
Apache License 2.0
48 stars 31 forks source link

Feature derive defmt for debug printing of enums #88

Open wallem89 opened 1 week ago

wallem89 commented 1 week ago

To be able to print signals with an enum with no_std I added defmt to format the enum values so they can be printed for debugging right away. This is done with an optional flag to enable this feature.

projectgus commented 5 days ago

@wallem89 I saw your PR and remembered I implemented defmt support a couple of months back, too. :facepalm:

I've submitted it as #91. It's similar to yours but I also implemented Format for message structs.

wallem89 commented 3 days ago

@wallem89 I saw your PR and remembered I implemented defmt support a couple of months back, too. 🤦

I've submitted it as #91. It's similar to yours but I also implemented Format for message structs.

Your PR works for me too. And i like the Format for the message structs. Let's get yours merged and into a next release!