mirror of
https://github.com/google/bumble.git
synced 2026-04-18 00:45:32 +00:00
add links
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
../../../../../../web/heart_rate_monitor/heart_rate_monitor.html
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../../../web/heart_rate_monitor/heart_rate_monitor.js
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
../../../../../../web/heart_rate_monitor/heart_rate_monitor.py
|
||||||
@@ -53,7 +53,9 @@ class HeartRateMonitor:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Notify subscribers of the current value as soon as they subscribe
|
# Notify subscribers of the current value as soon as they subscribe
|
||||||
@self.heart_rate_service.heart_rate_measurement_characteristic.on('subscription')
|
@self.heart_rate_service.heart_rate_measurement_characteristic.on(
|
||||||
|
'subscription'
|
||||||
|
)
|
||||||
def on_subscription(_, notify_enabled, indicate_enabled):
|
def on_subscription(_, notify_enabled, indicate_enabled):
|
||||||
if notify_enabled or indicate_enabled:
|
if notify_enabled or indicate_enabled:
|
||||||
self.notify_heart_rate()
|
self.notify_heart_rate()
|
||||||
@@ -63,6 +65,15 @@ class HeartRateMonitor:
|
|||||||
self.device.advertising_data = bytes(
|
self.device.advertising_data = bytes(
|
||||||
AdvertisingData(
|
AdvertisingData(
|
||||||
[
|
[
|
||||||
|
(
|
||||||
|
AdvertisingData.FLAGS,
|
||||||
|
bytes(
|
||||||
|
[
|
||||||
|
AdvertisingData.LE_GENERAL_DISCOVERABLE_MODE_FLAG
|
||||||
|
| AdvertisingData.BR_EDR_NOT_SUPPORTED_FLAG
|
||||||
|
]
|
||||||
|
),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
AdvertisingData.COMPLETE_LOCAL_NAME,
|
AdvertisingData.COMPLETE_LOCAL_NAME,
|
||||||
bytes('Bumble Heart', 'utf-8'),
|
bytes('Bumble Heart', 'utf-8'),
|
||||||
|
|||||||
Reference in New Issue
Block a user