tests/multi_bluetooth: Update to new config('mac') behaviour.
This commit is contained in:
parent
c4af714d58
commit
26b66804e9
|
@ -146,7 +146,7 @@ def instance1():
|
||||||
try:
|
try:
|
||||||
# Connect to peripheral and then disconnect.
|
# Connect to peripheral and then disconnect.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
conn_handle, _, _ = waiting_data
|
conn_handle, _, _ = waiting_data
|
||||||
|
|
|
@ -36,7 +36,7 @@ def instance1():
|
||||||
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[1] == BDADDR:
|
if data[0] == BDADDR[0] and data[1] == BDADDR[1]:
|
||||||
adv_types.add(data[2])
|
adv_types.add(data[2])
|
||||||
if adv_data is None:
|
if adv_data is None:
|
||||||
adv_data = bytes(data[4])
|
adv_data = bytes(data[4])
|
||||||
|
|
|
@ -76,7 +76,7 @@ def instance1():
|
||||||
try:
|
try:
|
||||||
# Connect to peripheral and then disconnect.
|
# Connect to peripheral and then disconnect.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
print("gap_disconnect:", ble.gap_disconnect(waiting_data[0]))
|
print("gap_disconnect:", ble.gap_disconnect(waiting_data[0]))
|
||||||
|
@ -88,7 +88,7 @@ def instance1():
|
||||||
|
|
||||||
# Connect to peripheral and then let the peripheral disconnect us.
|
# Connect to peripheral and then let the peripheral disconnect us.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
wait_for_event(_IRQ_PERIPHERAL_DISCONNECT, TIMEOUT_MS)
|
wait_for_event(_IRQ_PERIPHERAL_DISCONNECT, TIMEOUT_MS)
|
||||||
|
|
|
@ -97,7 +97,7 @@ def instance1():
|
||||||
|
|
||||||
# Connect to peripheral.
|
# Connect to peripheral.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
conn_handle, _, _ = waiting_data
|
conn_handle, _, _ = waiting_data
|
||||||
|
|
|
@ -137,7 +137,7 @@ def instance1():
|
||||||
try:
|
try:
|
||||||
# Connect to peripheral and then disconnect.
|
# Connect to peripheral and then disconnect.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
conn_handle, _, _ = waiting_data
|
conn_handle, _, _ = waiting_data
|
||||||
|
|
|
@ -85,7 +85,7 @@ def instance1():
|
||||||
try:
|
try:
|
||||||
# Connect to peripheral and then disconnect.
|
# Connect to peripheral and then disconnect.
|
||||||
print("gap_connect")
|
print("gap_connect")
|
||||||
ble.gap_connect(0, BDADDR)
|
ble.gap_connect(*BDADDR)
|
||||||
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
|
||||||
return
|
return
|
||||||
conn_handle, _, _ = waiting_data
|
conn_handle, _, _ = waiting_data
|
||||||
|
|
Loading…
Reference in New Issue