-
Notifications
You must be signed in to change notification settings - Fork 122
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
New mouse peripheral and tests #94
base: main
Are you sure you want to change the base?
New mouse peripheral and tests #94
Conversation
ab4cc34
to
459f4fb
Compare
459f4fb
to
6bf260e
Compare
6bf260e
to
7484c03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should probably be changed to fit the device :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.