mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
examples/bluetooth: Fix event code in ble_temperature_central.py.
This commit is contained in:
committed by
Damien George
parent
3705bc418c
commit
c6fd6a0d72
@@ -128,7 +128,7 @@ class BLETemperatureCentral:
|
|||||||
if conn_handle == self._conn_handle and uuid == _ENV_SENSE_UUID:
|
if conn_handle == self._conn_handle and uuid == _ENV_SENSE_UUID:
|
||||||
self._start_handle, self._end_handle = start_handle, end_handle
|
self._start_handle, self._end_handle = start_handle, end_handle
|
||||||
|
|
||||||
elif event == _IRQ_GATTC_SERVICES_DONE:
|
elif event == _IRQ_GATTC_SERVICE_DONE:
|
||||||
# Service query complete.
|
# Service query complete.
|
||||||
if self._start_handle and self._end_handle:
|
if self._start_handle and self._end_handle:
|
||||||
self._ble.gattc_discover_characteristics(
|
self._ble.gattc_discover_characteristics(
|
||||||
@@ -143,7 +143,7 @@ class BLETemperatureCentral:
|
|||||||
if conn_handle == self._conn_handle and uuid == _TEMP_UUID:
|
if conn_handle == self._conn_handle and uuid == _TEMP_UUID:
|
||||||
self._value_handle = value_handle
|
self._value_handle = value_handle
|
||||||
|
|
||||||
elif event == _IRQ_GATTC_CHARACTERISTICS_DONE:
|
elif event == _IRQ_GATTC_CHARACTERISTIC_DONE:
|
||||||
# Characteristic query complete.
|
# Characteristic query complete.
|
||||||
if self._value_handle:
|
if self._value_handle:
|
||||||
# We've finished connecting and discovering device, fire the connect callback.
|
# We've finished connecting and discovering device, fire the connect callback.
|
||||||
|
|||||||
Reference in New Issue
Block a user