New mouse peripheral and tests#94
Conversation
ab4cc34 to
459f4fb
Compare
459f4fb to
6bf260e
Compare
6bf260e to
7484c03
Compare
antoinevg
left a comment
There was a problem hiding this comment.
This is a great contribution, thank you so much.
Just a few minor niggles, if you could address those I'll be happy to merge this!
| # | ||
| # | ||
| """ | ||
| Create a basic mouse device with three buttons and two axis |
There was a problem hiding this comment.
This comment should probably be changed to fit the device :)
| # | ||
| # | ||
| """ | ||
| Create a basic mouse device with three buttons and two axis |
There was a problem hiding this comment.
This comment should probably be changed to fit the device :)
There was a problem hiding this comment.
Do we need this file? pyusb is included in the package's pyproject.toml dependencies.
|
|
||
| if __name__ == "__main__": | ||
|
|
||
| count = 1000 |
There was a problem hiding this comment.
Could you set this a bit lower? I've tested on both Cynthion and Hydradancer and a thousand iterations is going to take an awfully long time!
| print("End of enumeration") | ||
| STOP = datetime.datetime.now() | ||
|
|
||
| print(f"Success, enumerated {count} devices, took {STOP-START}") |
There was a problem hiding this comment.
Could you please output min/max/average for the time? I think that would be a bit more meaningful.
|
I'm converting this PR to a draft as I won't be able to refactor the code with the comments for at least a month, the loopback tests are not needed anymore (the current stress test is way better), but the speedtests/mouse device need a bit more work |
This PR adds a mouse peripheral, along with speedtests and loopback tests.
The tests might need some polishing, but it could be interesting to have some speed tests in the project. The loopback tests might be useless compared to the current test_transfer.