mirror of
https://github.com/google/bumble.git
synced 2026-06-08 08:42:26 +00:00
gatt: update read_characteristics_by_uuid to returns [(handle, value)] instead of [value]
This commit is contained in:
+3
-3
@@ -149,9 +149,9 @@ async def get_peer_name(peer, mode):
|
||||
if not services:
|
||||
return None
|
||||
|
||||
values = await peer.read_characteristics_by_uuid(GATT_DEVICE_NAME_CHARACTERISTIC, services[0])
|
||||
if values:
|
||||
return values[0].decode('utf-8')
|
||||
characteristics = await peer.read_characteristics_by_uuid(GATT_DEVICE_NAME_CHARACTERISTIC, services[0])
|
||||
if characteristics:
|
||||
return characteristics[0][1].decode('utf-8')
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -712,7 +712,7 @@ class Client:
|
||||
logger.warning(f'bogus handle value: {attribute_handle}')
|
||||
return []
|
||||
|
||||
characteristics_values.append(attribute_value)
|
||||
characteristics_values.append((attribute_handle, attribute_value))
|
||||
|
||||
# Move on to the next characteristics
|
||||
starting_handle = response.attributes[-1][0] + 1
|
||||
|
||||
Reference in New Issue
Block a user