bricknil.ble_queue¶
Singleton interface to the Adafruit Bluetooth library
Members¶
-
class
bricknil.ble_queue.BLEventQ(ble)[source]¶ Bases:
bricknil.process.ProcessAll bluetooth comms go through this object
Provides interfaces to connect to a device/hub, send_messages to, and receive_messages from. Also abstracts away the underlying bluetooth library that depends on the OS (Adafruit_Bluefruit for Mac, and Bleak for Linux/Win10)
All requests to send messages to the BLE device must be inserted into the
bricknil.BLEventQ.qQueue object.-
connect(hub)[source]¶ We probably need a different ble_queue type per operating system, and try to abstract away some of these hacks.
Todo
- This needs to be cleaned up to get rid of all the hacks for different OS and libraries
-