New opendbc are not compatible
btaczala opened this issue · 4 comments
A lot of opendbc files are broken because they seem to have been edited by hand with some (Windows?) editor.
Example: https://github.com/commaai/opendbc/blob/master/tesla_can.dbc#L101
This line reads
BO_ 14 STW_ANGLHP_STAT: 8 STW\r\SPACE\n
something dos2unix in https://github.com/GENIVI/CANdb/blob/master/src/dbcparser.cpp#L74 would not be able to fix.
I don't think that the opendbc files are good test cases because of that.
Idea: Better create a dedicated repository under GENIVI with dbc files produced by other (reference) tools. You can find a lot of genuine dbc files on GitHub under free licenses by searching for lines that are only produced by Vector tools: https://github.com/search?q=BA_DEF_+SG_++%22GenSigStartValue%22&type=Code
My attempts at testing CANDevStudio ground to a halt because of this. I compiled CDS myself from the master branch pulled just a short while ago. I'm running Ubuntu 20.04.
NO DBC files that I load work at all. Sure, some of them I made myself with my own tools. You could blame me for producing slightly odd files. I'm sure my DBC files are not 100% conformant to the spec. But, Vector tools can load them. More or less official Tesla DBC files do NOT load in CANdevStudio. Official DBC files from Rinehart Motion do not load. Really, nothing that I try loads - I have a lot of DBC files too. ALL of these DBC files load fine elsewhere. I don't think it's fair to blame the DBC files when so many (seemingly ALL) blow up the loader. It seems there's some sort of unique trouble with the DBC loader in CANDevStudio as it accepts nothing while all the other programs I use that have DBC loaders can load these files perfectly fine. So, suspicion has to fall on the loader within CDS and not on the individual DBC files themselves.
Edit: sorry, thought I was commenting on an issue for CDS. Still, it all holds. CANdb is not loading any DBC files for me and I tried several from different sources. None work at all.
@collin80 Even if the issues are resolved, the frame decoder / encoder of CANDevStudio is unfortunately also wrong.
Read this to learn more: GENIVI/CANdevStudio#202
If you need to have a working (FL)OSS solution now, I can suggest https://github.com/eerimoq/cantools - you won't get a fancy UI but all the scripting power of python :)
GENIVI/CANdevStudio#202 Fixed with GENIVI/CANdevStudio#206 in v1.2.1