mirror of
https://github.com/meshtastic/python.git
synced 2026-04-19 22:37:21 -04:00
Merge remote-tracking branch 'origin/master' into protobuf-ble-logging
This commit is contained in:
@@ -61,8 +61,11 @@ class BLEInterface(MeshInterface):
|
||||
self.close()
|
||||
raise e
|
||||
|
||||
#self.client.start_notify(LEGACY_LOGRADIO_UUID, self.legacy_log_radio_handler)
|
||||
self.client.start_notify(LOGRADIO_UUID, self.log_radio_handler)
|
||||
if self.client.has_characteristic(LEGACY_LOGRADIO_UUID):
|
||||
self.client.start_notify(LEGACY_LOGRADIO_UUID, self.legacy_log_radio_handler)
|
||||
|
||||
if self.client.has_characteristic(LOGRADIO_UUID):
|
||||
self.client.start_notify(LOGRADIO_UUID, self.log_radio_handler)
|
||||
|
||||
logging.debug("Mesh configure starting")
|
||||
self._startConfig()
|
||||
@@ -270,6 +273,10 @@ class BLEClient:
|
||||
def write_gatt_char(self, *args, **kwargs): # pylint: disable=C0116
|
||||
self.async_await(self.bleak_client.write_gatt_char(*args, **kwargs))
|
||||
|
||||
def has_characteristic(self, specifier):
|
||||
"""Check if the connected node supports a specified characteristic."""
|
||||
return bool(self.bleak_client.services.get_characteristic(specifier))
|
||||
|
||||
def start_notify(self, *args, **kwargs): # pylint: disable=C0116
|
||||
self.async_await(self.bleak_client.start_notify(*args, **kwargs))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user