-
Notifications
You must be signed in to change notification settings - Fork 112
Pass in devices #43
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
Pass in devices #43
Conversation
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.
Instead of breaking upward compatibility, how about making devices
be an optional arg devices=None
, and if it is None
, conditionally importing usb_hid
and then passing usb.hid_devices
to find_device()
? That will save having to change a lot of existing code, and will simplify the use in the USB case, which is the most common case.
I'd rather not have the USB be auto-magic. It's more readable to have it passed in. (Taking a USB example and porting to BLE would be much clearer for example.) Furthermore, it removes a dependency on |
The issue I see is that there are many existing examples including in Learn Guides (I counted at least 17 Learn Guides, and there may be more), and we'll break a lot of existing code if the bundles start including an incompatible library. We'd also probably want to update the frozen lib again on 4.x. Suppose we made it upward compatible for 5.0, and then gradually changed the examples and cut over for 6.0 (like we are doing for |
I'd rather figure out how to update everything as needed than stretch out the update over a period of time where more examples may be created. It's important for us to have the flexibility to update our APIs over time. I can prep a PR for updating these examples:
|
I'll approve, but won't merge, so we can merge a corresponding Learn Guides PR immediately after the bundle is published |
Merging now. Will follow up with Learn code updates and updating frozen in CP master. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.8.4 from 3.8.1: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#59 from makermelissa/master > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#58 from makermelissa/master > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#57 from makermelissa/master Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 4.0.0 from 3.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_HID#43 from tannewt/pass_in_devices > Merge pull request adafruit/Adafruit_CircuitPython_HID#44 from adafruit/dherrada-patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Added the following libraries: Adafruit_CircuitPython_LIS2MDL
This will be a new major version because the constructor signature changes.
hid_simpletest.py
andhid_keyboard_shortcuts.py
tested and work.