-
Notifications
You must be signed in to change notification settings - Fork 18
Add USB support #69
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 USB support #69
Conversation
f0ce6e0
to
99bae21
Compare
@dlech This adds enough functionality to push programs. I'm still working on receiving data from the device. |
I added a branch with a few more changes here: https://github.com/pybricks/pybricksdev/tree/dlech-usb |
db05dcf
to
335903e
Compare
@dlech This now processes stdout and status messages. Marking as ready for review. |
Cool! It will probably be a few weeks before I can have a close look. |
d769458
to
3456029
Compare
170da39
to
da4e389
Compare
c705276
to
540e6d3
Compare
New patchset using transport composition class. Still uses UUIDs instead of separate endpoints. |
6493165 is going to be a disruptive breaking change. I agree it is better to do things in the constructor but I am undecided if it is that much better that it is worth breaking people's programs. Edit: after reviewing the code and seeing how many projects on GitHub are using pybricksdev, I'm thinking it would be best not to make this particular change. |
22e7113
to
963b578
Compare
Waiting for command responses now works. I need to clean up the pybricks-micropython code a bit and will then push that up. |
4c5ddff
to
260c9c8
Compare
Moves client creation into the PybricksHub constructor. A future change will move this into a subclass specific for BLE or USB, so configuring this is more appropriately done in the constructor instead of the connect method. The disconnect logic is moved into a class method so that it can be shared by both BLE and USB implementations. Temporarily comments out a message that prints the device name as this is no longer available in the connect method. Signed-off-by: Nate Karstens <[email protected]>
Moves all logic specific to BLE connections into a new subclass of PybricksHub. Another subclass will be added later to handle USB connections. Code to retrieve firmware version, hub capabilities, etc. is moved into the connect step to better abstract this for any connection medium. Signed-off-by: Nate Karstens <[email protected]>
Adds a new subclass of PybricksHub that manages USB connections. Co-developed-by: David Lechner <[email protected]> Signed-off-by: Nate Karstens <[email protected]>
I fixed the bitrot and reworked this a bit based on the changes I made on the firmware side. It has been tested working with this build: https://github.com/pybricks/pybricks-micropython/actions/runs/13093071041 |
Adds USB support in concert with pybricks/pybricks-micropython#208