tinymovr / avlos

Avlos Remote Object Templating System

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DBC generation

eufrizz opened this issue · comments

I was trying out the CAN .dbc generation functionality with the Tinymovr repo, and noticed (as you are probably aware) that it doesn't work - I'm guessing it's unfinished. I started fixing it in the fixDbcGeneration branch in my fork by changing the device.dbc.jinja file so the syntax errors are now gone, but there is still more work needed to get it working it seems. I'm testing it with a simple candump can0 | cantools decode tinymovr.dbc.
It still needs to deal with heartbeat messages, and the all the warnings that cantools spits out with all the getters and setters that have the same endpoint id
WARNING:cantools.database.can.database:Overwriting message 'controller_get_state' with 'controller_set_state' in the frame id to message dictionary because they have identical masked frame ids 0xe.

Thanks for the detailed description. As you mentioned, DBC is still a work in progress, and we plan to add testing for this as well. The main issue I see, which may be worth a protocol revision is that currently we use a single endpoint id for reading and writing (differentiating by the RTR bit). To be fully compliant, this may warrant a revision

I merged your fix (thanks!) and also added tests for generated DBC files using cantools dump. I'll accept the warnings for now, but it needs to be addressed.

Great, looking forward to seeing how it goes in future!