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

Use message name instead of self #85

Closed scootermon closed 2 months ago

scootermon commented 2 months ago

The generated code for multiplexed messages is currently invalid because Self doesn't point to the message type in those cases and doesn't have a MESSAGE_ID

killercup commented 2 months ago

Would be awesome to have a test for this in a follow-up :)

scootermon commented 2 months ago

Would be awesome to have a test for this in a follow-up :)

I really wanted to but it didn't seem like the repository is currently well equipped to easily add such tests. I was thinking about introducing trybuild to create fully automatic tests.