diff --git a/api/ble.py b/api/ble.py index de3f8de..6c3d519 100644 --- a/api/ble.py +++ b/api/ble.py @@ -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,