examples/bluetooth: Fix check for _conn_handle being None.
Fixes issue #10755. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
41ed01f139
commit
e1f211c6b5
@ -179,7 +179,7 @@ class BLESimpleCentral:
|
|||||||
|
|
||||||
# Disconnect from current device.
|
# Disconnect from current device.
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
if not self._conn_handle:
|
if self._conn_handle is None:
|
||||||
return
|
return
|
||||||
self._ble.gap_disconnect(self._conn_handle)
|
self._ble.gap_disconnect(self._conn_handle)
|
||||||
self._reset()
|
self._reset()
|
||||||
|
@ -196,7 +196,7 @@ class BLETemperatureCentral:
|
|||||||
|
|
||||||
# Disconnect from current device.
|
# Disconnect from current device.
|
||||||
def disconnect(self):
|
def disconnect(self):
|
||||||
if not self._conn_handle:
|
if self._conn_handle is None:
|
||||||
return
|
return
|
||||||
self._ble.gap_disconnect(self._conn_handle)
|
self._ble.gap_disconnect(self._conn_handle)
|
||||||
self._reset()
|
self._reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user