Fixed usb transmitting being unreliable #47
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know that this version is different from the original implementation of the driver by sonix, but at least for me, it seems to be the most stable one. During stress testing send and receive I got 500 packages for each direction and a total loss of 0.00019% packages from a total of 7,232,000. 14mio if you count both directions. And this loss is either rec or send, as I just checked if I got an answer for each package, not if it arrived at the keyboard and if I got an answer.
Also, with this version via worked as it should (Creating macros, changing keys, reconnecting after restarting keyboard). With all other version via would break the UI update, as soon as I create a new macro.
So in the end, I don't know why it fixes it (maybe because ack and nak need to be always handeled?) and why the original sonix driver did different things, but atleast i'm happy, as it seems to be working now as it should.