ble.py - remove a history line and rename variable

This commit is contained in:
matt committed 2026-10-18 05:10:39 -07:00
1 parent 83698ad8bd
commit 9a88a0eab6
1 file changed
+11 -11
+11 -11
View File
@@ -291,8 +291,8 @@ 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("Creating mac_history variable")
mac_history = []
print("Done")
prev_list_snapshot = None
print("Just before the loop")
@@ -300,18 +300,18 @@ def test(test_count = 0, bt_usb_id = None) -> None:
# 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)
# List unchanged - add to mac_history
print("List unchanged - add to mac_history")
mac_history.append(passed_list)
else:
# List changed - reset history
print("List changed - reset history")
history = []
history.append(current_list)
# if len(history) == 5 and all(lst == history[0] for lst in history):
# List changed - reset mac_history
print("List changed - reset mac_history")
mac_history = []
# mac_history.append(current_list)
# if len(mac_history) == 5 and all(lst == mac_history[0] for lst in mac_history):
# log.warning(f"Last 5 tests have been identical, resetting adapter")
# reset_adapter()
# history = []
# mac_history = []
# prev_list_snapshot = current_list
log.info(f" Test run: {test_count} - loop {test_loop_count} start. Initializing run...")