We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 26325f6 + 53f6352 commit 434e7e0Copy full SHA for 434e7e0
examples/ble_apple_notifications.py
@@ -10,7 +10,6 @@
10
11
radio = adafruit_ble.BLERadio()
12
a = SolicitServicesAdvertisement()
13
-a.complete_name = "NotifyPlease"
14
a.solicited_services.append(AppleNotificationService)
15
radio.start_advertising(a)
16
@@ -28,10 +27,8 @@
28
27
print("paired")
29
30
ans = connection[AppleNotificationService]
31
- for notification in ans:
32
- if notification.id not in known_notifications:
33
- print(notification)
34
- known_notifications.add(notification.id)
+ for notification in ans.wait_for_new_notifications():
+ print(notification)
35
time.sleep(1)
36
37
print("disconnected")
0 commit comments