From 6dbfef0b38749e409ddcdcc5be5221ec03d7d544 Mon Sep 17 00:00:00 2001 From: matt Date: Sun, 18 Oct 2026 05:07:14 -0700 Subject: [PATCH] ble.py - add some history code back --- api/ble.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/api/ble.py b/api/ble.py index 7bd45d4..c4461ee 100644 --- a/api/ble.py +++ b/api/ble.py @@ -291,18 +291,18 @@ def test(test_count = 0, bt_usb_id = None) -> None: test_list = mac_list passed_list = [] # History buffer - keep the last N snapshots (N=5) - #print("Creating history variable") - #history = [] - #print("Done") - #prev_list_snapshot = None - #print("Just before the loop") + print("Creating history variable") + history = [] + print("Done") + prev_list_snapshot = None + print("Just before the loop") while not test_result: # Check if the failed list has been the same for 5 loops - #print("Check if the failed list has been the same for 5 loops") - # if prev_list_snapshot is not None and passed_list == prev_list_snapshot: - # # List unchanged - add to history - # print("List unchanged - add to history") - # history.append(passed_list) + print("Check if the failed list has been the same for 5 loops") + if prev_list_snapshot is not None and passed_list == prev_list_snapshot: + # List unchanged - add to history + print("List unchanged - add to history") + history.append(passed_list) # else: # # List changed - reset history # print("List changed - reset history")