technocreatives / dbc-codegen

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

Remove float value comparison #43

Closed marcelbuesing closed 2 years ago

marcelbuesing commented 2 years ago

@killercup you were right previously, there is no need to compare floating point values. So besides obviously being more efficient it's also correct now, I ran into issues where the floating point comparison did not work. The reason why I removed the From implementation is basically that there is no way to access the signal_raw fn in the From implementation. Not super happy with how the generated code looks like so I am open to suggestions.

Additional changes:

killercup commented 2 years ago

Hey, sorry it took me a while to get to this! Thanks! :)