Closed soupyt closed 4 years ago
How does the database definition look like? We are using the signals as a dictionary so the code should be right basically.
Sorry for the delay, a lot going on these days . . .
Do you need the entire database definition?
I started with a DBC file from https://www.csselectronics.com, which states:
This OBD2 DBC demo contains most of the standardized OBD2 PIDs from Mode 01. It does not contain proprietary PIDs, though you can freely expand the DBC as you see fit.
Note that the OBD2 DBC uses complex multiplexing to achieve conversion of the data. This follows the DBC standard, but few tools support it.
Which I then converted to a kcd file using canmatrix. This yielded a XML document of the form:
`
@soupyt Which node version are you using actually? I tested your bus definition on all supported NodeJS version (8, 10, 12 and 13) and it doesn't through the error as you report.
See https://travis-ci.com/github/sebi2k1/node-can/builds/160913318 for build logs of the test run.
In the Message() function in socketcan.js, the empty array
this.signals
is addressed with a string (like an object, not an index:This causes the error:
Should
this.signals
be initialized as an object instead?