-
Notifications
You must be signed in to change notification settings - Fork 599
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 usage of select instead of pulling for Linux based platform (PCAN Interface) #1410
Add usage of select instead of pulling for Linux based platform (PCAN Interface) #1410
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1410 +/- ##
===========================================
- Coverage 65.16% 64.64% -0.53%
===========================================
Files 81 81
Lines 8853 9183 +330
===========================================
+ Hits 5769 5936 +167
- Misses 3084 3247 +163 |
Looks good! I haven't tested it with hardware though. We should probably do that. |
Tested on my side, this update will be a little less consumer than the polling. |
Sorry for being this pedantic, but on which platforms did you try this? There appear to be 4 variants here: Windows and Linux and each with and without polling. For each of the 4, sending and receiving has to work. 🙂 |
Based on my changes: |
Okay, thank you for documenting that here. 🙂 I think this is sufficient, since the polling implementation did not really change and there are also unit tests that make sure nothing gets too broken. I'd propose to merge it as it. |
You are the boss :) |
Arf I wrongly click and close I am sorry |
@hardbyte You can merge it before or after the 4.1.0 release. If you add it before, we'd have to amend the changelog. |
b40b391
to
890eee3
Compare
…n_interface_on_linux # Conflicts: # can/interfaces/pcan/pcan.py
@BKaDamien I cleaned up a bit, please take a look. |
It's fine. Thanks for the chnages. |
… Interface) (hardbyte#1410) * - integrate handling of Linux based event using select for pcan interface * - adapt pcan unit tests regarding PCAN_RECEIVE_EVENT GetValue call * - add the case HAS_EVENTS = FALSE whne no special event basic mechanism is importes * - force select mock for test_recv_no_message * - just for testing : see what is going wrong with CI testing and my setup * - correct patch on pcan test test_recv_no_message - run black * - remove debug log * -just reformat test_pcan * - move global variable IS_WINDOW and IS_LINUX from pcan to basic module * - remove redundant comment in pcan _recv_internal * refactor _recv_internal Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
Avoid pulling of "time.sleep(0.001)" in pcan interface method _recv_internal, and use select python function instead.