-
Notifications
You must be signed in to change notification settings - Fork 111
Allow devices to be passed in, instead of always using usb_hid #40
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
Allow devices to be passed in, instead of always using usb_hid #40
Conversation
If consumer_device is None (the default), find a usb_hid device to use. | ||
But an equivalent device can be supplied instead for other kinds of consumer devices, | ||
such as BLE. | ||
It only needs to implement ``send_report()``. |
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.
How about just having a hid_devices parameter that can either be usb_hid.devices
or ble_hid.devices
rather than having one version look through a list and the other not?
I want to construct the devices on the ble side dynamically anyway and it's easy enough to put them in a list.
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.
Looks good!
@tannewt @dhalbert I am very sorry; I accidentally merged this while trying to automate something else. I've reverted the merge but because merged PRs can't be re-opened another PR will have to be made. I will do that if you wish. Very sorry. I'm gonna revoke the tokens in question until I can assure you guys it won't happen again. |
Don't worry about it. I don't think you need to revoke the tokens ?! |
Eh, it was my way of slapping myself on the wrist. I should have tested against a sandbox repo but thought (clearly incorrectly) that my safeguards would be enough. Lesson learned. |
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 2.1.5 from 2.1.4: > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#73 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#72 from dherrada/master > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#70 from dcbriccetti/tilt-instrument Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.5.1 from 3.5.0: > Merge pull request adafruit/Adafruit_CircuitPython_GPS#37 from kattni/setup-py-update Updating https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS1 to 2.0.5 from 2.0.4: > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#17 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_LSM9DS1#16 from 2bndy5/master Updating https://github.com/adafruit/Adafruit_CircuitPython_Debouncer to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_Debouncer#12 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_Debouncer#11 from dastels/master Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 3.3.6 from 3.3.5: > Merge pull request adafruit/Adafruit_CircuitPython_HID#41 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_HID#42 from adafruit/revert-40-alternate-devices-for-ble > Merge pull request adafruit/Adafruit_CircuitPython_HID#40 from dhalbert/alternate-devices-for-ble Updating https://github.com/adafruit/Adafruit_CircuitPython_MIDI to 1.1.1 from 1.1.0: > Merge pull request adafruit/Adafruit_CircuitPython_MIDI#13 from kevinjwalters/master > Merge pull request adafruit/Adafruit_CircuitPython_MIDI#16 from adafruit/dherrada-patch-1
This is to be used in conjunction with
HIDServer
from the Adafruit_CircuitPython_BLE library. There is also a bunch of cleanup. I am not sure this is the final API.