You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
No exception since the command is correct and a timeout of 5 seconds should be sufficient. The sleep(1) makes sure to not run too many commands.
Desktop:
OS: Linux
Architecture ARM
Python 3.7.4
ATtila 1.1.4
The text was updated successfully, but these errors were encountered:
Let me explain the problem here:
With a multi threading system you could just have one thread reading and providing the buffer to the main thread, while here there's no multi threading and when you write the process will start reading and then it waits for the other endpoint to finish writing.
This is fine, except for the fact that sometimes pyserial, which is used by ATtila to interface with serial devices, says there's nothing to read and the read returns. The timeout indeed is only used when no data has been read.
The last fix, improved a lot the performance, but in many cases it missed the bytes. This happens especially when using a low baud rate (such as 9600 indeed).
I've managed to fix this issue, but yep, the performance is lower. Still fast, but not superfast.
The problem is that I want to guarantee my read function to wait for the endpoint to finish, but this involves delays, which are annoying. In my opinion it's not too slow, and should be fine. I don't think I want to make other fixes for this issue, since here I can choose between:
better performance, but lower reliability
higher reliability, worse performance
multi threading, which is OK, but implies many things. I don't know if it's worth or not for this project tbh.
If you want to give it a try, there's a patch 1.1.5.
Describe the bug
I often get bad response to the same command :
To Reproduce
Run the following code
Expected behavior
No exception since the command is correct and a timeout of 5 seconds should be sufficient. The sleep(1) makes sure to not run too many commands.
Desktop:
The text was updated successfully, but these errors were encountered: