Commit 78420854 authored by Damien George's avatar Damien George

tests/multi_bluetooth/ble_gap_advertise.py: Allow to work without set.

Signed-off-by: default avatarDamien George <damien@micropython.org>
parent da8e47da
...@@ -30,14 +30,14 @@ def instance0(): ...@@ -30,14 +30,14 @@ def instance0():
def instance1(): def instance1():
multitest.next() multitest.next()
finished = False finished = False
adv_types = set() adv_types = {}
adv_data = None adv_data = None
def irq(ev, data): def irq(ev, data):
nonlocal finished, adv_types, adv_data nonlocal finished, adv_types, adv_data
if ev == _IRQ_SCAN_RESULT: if ev == _IRQ_SCAN_RESULT:
if data[0] == BDADDR[0] and data[1] == BDADDR[1]: if data[0] == BDADDR[0] and data[1] == BDADDR[1]:
adv_types.add(data[2]) adv_types[data[2]] = True
if adv_data is None: if adv_data is None:
adv_data = bytes(data[4]) adv_data = bytes(data[4])
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment