-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add SocketCAN support to the hub application on the Raspberry Pi #327
Conversation
applications/hub/main.cxx
Outdated
bind(s, (struct sockaddr *)&addr, sizeof(addr)); | ||
|
||
new HubDeviceSelect<CanHubFlow>(&can_hub0, s); | ||
// connections.emplace_back(port); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As requested, I've removed the commented line and committed the change to my repo. Unsure how to refresh this PR
@@ -0,0 +1,140 @@ | |||
/** \copyright |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file looks like an exact copy of the one under targets/linux.x86. Please make this a symbolic link instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, it would be better to move this code to use os/MDNS.hxx/cxx I think since this code looks almost verbatim for both the linux.x86 and now linux.rpi1. I was contemplating making this update since I'm using this same hub app on my rPi 3B+ but the linux.x86 app compiled and works on there without alteration (I ran make from top level dir)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I had to do a copy/paste of the code to get a clean compile. Making this a shared file would be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead, it would be better to move this code to use os/MDNS.hxx/cxx I think since this code looks almost verbatim for both the linux.x86 and now linux.rpi1. I was contemplating making this update since I'm using this same hub app on my rPi 3B+ but the linux.x86 app compiled and works on there without alteration (I ran make from top level dir)
Ok well if the x86 version doesn't have the issue and it builds on the RPi then is it better to simply drop the RPi specific port? Otherwise I'll add the symbolic link
Removed dead code
Hi Guys,
Here's the changes I made to add SocketCAN support to the hub application, to build on the Raspberry Pi.
I've also included some build notes in the README.md file with links to the CAN Interface and Linux kernel driver build instructions