Closed dhnc4u closed 3 years ago
Hello, it is implemented in the develop branch. See #641
Thank you for pointing that out @zariiii9003 , I can confirm it is. This means it will only be available in Python-CAN 4.x, not 3.x, correct ? What would be the quickest way to have this fix available in a/any stable release please ?
You can use the 4.0 pre-release: pip install python-can==4.0.0.dev0
We could add it to 3.3.4 but that depends on whether @hardbyte considers this a bug or just a missing feature.
I'd say it is the latter.
Thank you @karlding for the commit. Slightly off-topic: Do you know if it ever has been considered to include transceiverName and serialNumber in the dictionary list returned by __detect_availableconfigs ? In our setup we have multiple Vector devices connected (vehicle level tests), and we have a hard time differentiating all the channels it returns. By adding those 2 parameters, the return value would be much clearer.
The __detect_availableconfigs method in canlib.py for Vector returns all channels enumerated by the driver. This includes LIN, Digital/Analog I/O, ... channels, which are not in scope of a CAN library, but are supported by the connected hardware. In addition, I could not find an (implemented) way to get the channel type of the returned channels.
Based on page 63 of the XL Driver Library Manual, I propose a minor change to __detect_availableconfigs, to only return channels supporting CAN:
if channel_config.channelBusCapabilities & vxlapi.XL_BUS_ACTIVE_CAP_CAN:
This requires the following to be added to vxlapi.py:XL_BUS_ACTIVE_CAP_CAN = 65536
Any thoughts or things I missed ? Thanks, David.