Skip to content

SocketCAN low level fixes #296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 26, 2018
Merged

SocketCAN low level fixes #296

merged 4 commits into from
Apr 26, 2018

Conversation

felixdivo
Copy link
Collaborator

@felixdivo felixdivo commented Apr 10, 2018

Changes to SocketCAN CTypes:

  • libc.write(...) might write less bytes than requested, and is now called in a loop until all data has been transmitted
  • better error messages when sending: old can.socketcan.ctypes failed to transmit -> new can.socketcan_ctypes failed to transmit: ENETDOWN (errno 100): Network is down

Changes to SocketCAN Native:

Other:

  • removed the executable flag from test/listener_test.py
  • Added a IS_UNIX flag to test/config.py (it was required by a newly created unit test)

@felixdivo
Copy link
Collaborator Author

I tested the ctypes part rudimentary with some examples, but I would like to wait at least until #293 is merged so we can test SocketCAN on Travis CI. It would be good to also write more tests (see #273), maybe we could use GenericInterfaceTest from #290 for that.

@@ -34,6 +34,7 @@
IS_WINDOWS = "windows" in _sys or ("win" in _sys and "darwin" not in _sys)
IS_LINUX = "linux" in _sys
IS_OSX = "darwin" in _sys
IS_UNIX = IS_LINUX or IS_OSX
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure some people would disagree with this definition of UNIX :-P

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sure. But it works here and I could not find anything better in the first Google attempt ;-)

@hardbyte hardbyte added this to the 2.2 Release milestone Apr 26, 2018
@hardbyte hardbyte merged commit 9c73316 into develop Apr 26, 2018
@hardbyte hardbyte deleted the socketcan-low-level-fixes branch April 26, 2018 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants