Skip to content

Conversation

oystub
Copy link

@oystub oystub commented Dec 18, 2024

python-can's recv function is supposed to take a timeout in seconds or None, not in milliseconds or -1.
See issue #77

In addition, in newer versions of python-can, the flush_tx_buffer raises a NotImplementedError for many interface types like socketcan. I raised an issue requesting a change in this behaviour here: hardbyte/python-can#1922

This combination makes pydronecan unresponsive, and not working for send-operations at all if python-can is installed on the system, so I think a workaround like this is warranted.

python-can's recv function is supposed to take a timeout in seconds, or None, not in milliseconds or -1.
E.g. the socketcan interface does not have `flush_tx_buffer` implemented. Calling the function without a `try` would cause send operations to fail.
@oystub oystub changed the title driver/python_can: use correct timeout for pyhon-can recv() driver/python_can: fix the way recv and flush_tx_buffer are called Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant