improve get service advertising data

This commit is contained in:
Yuyang Huang
2022-12-05 11:21:20 -08:00
parent 697d5df3f8
commit 29f9a79502
4 changed files with 14 additions and 10 deletions

View File

@@ -940,11 +940,6 @@ class Device(CompositeEventEmitter):
if self.advertising:
await self.stop_advertising()
# add each Service's advertising data
for attribute in self.gatt_server.attributes:
if isinstance(attribute, Service):
self.advertising_data += attribute.get_service_advertising_data()
# Set/update the advertising data if the advertising type allows it
if advertising_type.has_data:
await self.send_command(HCI_LE_Set_Advertising_Data_Command(