VernierST / godirect-py

A Python module for reading from Vernier Go Direct® Sensors using USB or BLE.
GNU General Public License v3.0
8 stars 9 forks source link

Update Bleak to use BleakScanner #31

Open stocktonkincade opened 4 months ago

stocktonkincade commented 4 months ago

Update backend_bleak.py to use BleakScanner and avoid future deprecation of scanning/discovery. See this example and this example for ideas.

The error we currently see is: C:\Python311\Lib\site-packages\godirect-1.1.4-py3.11.egg\godirect\backend_bleak.py:21: FutureWarning: The discover function will removed in a future version, use BleakScanner.discover instead. C:\Python311\Lib\site-packages\godirect-1.1.4-py3.11.egg\godirect\backend_bleak.py:28: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead