tests/multi_bluetooth: Update to new config('mac') behaviour.

This commit is contained in:
Jim Mussared 2020-08-14 15:16:29 +10:00 committed by Damien George
parent c4af714d58
commit 26b66804e9
6 changed files with 7 additions and 7 deletions

View File

@ -146,7 +146,7 @@ def instance1():
try:
# Connect to peripheral and then disconnect.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
conn_handle, _, _ = waiting_data

View File

@ -36,7 +36,7 @@ def instance1():
def irq(ev, data):
nonlocal finished, adv_types, adv_data
if ev == _IRQ_SCAN_RESULT:
if data[1] == BDADDR:
if data[0] == BDADDR[0] and data[1] == BDADDR[1]:
adv_types.add(data[2])
if adv_data is None:
adv_data = bytes(data[4])

View File

@ -76,7 +76,7 @@ def instance1():
try:
# Connect to peripheral and then disconnect.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
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.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
wait_for_event(_IRQ_PERIPHERAL_DISCONNECT, TIMEOUT_MS)

View File

@ -97,7 +97,7 @@ def instance1():
# Connect to peripheral.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
conn_handle, _, _ = waiting_data

View File

@ -137,7 +137,7 @@ def instance1():
try:
# Connect to peripheral and then disconnect.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
conn_handle, _, _ = waiting_data

View File

@ -85,7 +85,7 @@ def instance1():
try:
# Connect to peripheral and then disconnect.
print("gap_connect")
ble.gap_connect(0, BDADDR)
ble.gap_connect(*BDADDR)
if not wait_for_event(_IRQ_PERIPHERAL_CONNECT, TIMEOUT_MS):
return
conn_handle, _, _ = waiting_data