ble - fixing test_driver after cleanup - short mac list

This commit is contained in:
matt committed 2026-10-21 00:13:49 -07:00
1 parent ee78a1965c
commit e04345e4d9
1 file changed
+7 -1
+7 -1
View File
@@ -270,6 +270,10 @@ def test_driver(test_count = 0, bt_usb_id = None):
# this gets MACs from the comment dict in config
for mac in comment_lookup:
mac_list.append(mac['mac'])
mac_list = [
"A4:C1:38:11:F4:2A",
"A4:C1:38:D7:8D:26"
]
log.info("Starting BLE test...")
log.info(f" Scanning MACs: {mac_list}")
# test_list shrinks with successful tests
@@ -319,10 +323,10 @@ def test_driver(test_count = 0, bt_usb_id = None):
# If all the MACs have been scanned, then this test is complete.
if len(mac_list) == len(passed_list):
log.info(f" Test run {test_count} completed, yee-haw")
test_complete = True
print("Printing sensor results: ")
print(sensors)
print_sensor_data(sensors)
test_complete = True
return summarize_test_run(sensors, found_macs)
# If not, then re-scan the failed sensors
else:
@@ -340,7 +344,9 @@ def test_driver(test_count = 0, bt_usb_id = None):
# helper function for summarizing test run results
def summarize_test_run(sensors, found_macs):
sensor_count = 1
for sensor in sensors:
print(f"Sensor count: {sensor_count}")
log.info(f" {sensor['name']} - Temp: {temp_ctof(sensor['temp'])} | Humidity: {sensor['humidity']}")
result = {
"found_macs": found_macs,