Skip to content
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

Merged
merged 4 commits into from
Sep 2, 2020

Conversation

kiwi64ajs
Copy link
Collaborator

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

bind(s, (struct sockaddr *)&addr, sizeof(addr));

new HubDeviceSelect<CanHubFlow>(&can_hub0, s);
// connections.emplace_back(port);
Copy link
Owner

Choose a reason for hiding this comment

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

Remove dead code.

Copy link
Collaborator Author

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
Copy link
Owner

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.

Copy link
Collaborator

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)

Copy link
Collaborator Author

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

Copy link
Collaborator Author

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
@balazsracz balazsracz merged commit 00eb2c2 into bakerstu:master Sep 2, 2020
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.

4 participants