-
Notifications
You must be signed in to change notification settings - Fork 93
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 read with timeout feature #165
Conversation
Add support for timeout read in the following modes * UART * LIN * SMARTCARD
Since basic read functions now work with a timeout, these two functions are useless
I've just tested it with a smartcard and it works like a charm:
The fact that using the Having said that, the (It would be great to be able to define aliases for certain recurring commands, like " I'll do some more tests over the weekend and let you know if I come across any problems. |
Thanks for the fast feedback Yes we shall clearly change that default timeout to something smaller more realistic (even on big command with big answer which shall in theory take less than 2s in majority of cases)
Could you create an issue about the alias (as new feature) ?
|
Thank you both for testing ;) We can totally lower the default timeout values. Regarding the |
Maybe add that feature on Wiegand also (I have tested uart with success) |
I did a quick check, and Wiegand could use a full rewrite. |
Wiegand is clearly not a priority, I have nothing to test it too (so far) so keep that for future potential improvement |
Based on #164 this PR adds a read with timeout feature.
timeout
keyword to set timeout in miliseconds on all relevant modes (UART, LIN, Smartcard)read
andhd
commands behavior. They now display read bytes and show an message if not every byte requested could be readExample with UART in loopback mode:
This might need to be further tested before being included. Maybe @bvernoux and @0xDRRB could do some tests ?