ble.py - adding some debug prints
This commit is contained in:
1 parent
63b2f85eb3
commit
aa538ed7bd
1 file changed
+3
@@ -290,15 +290,18 @@ def test(test_count = 0, bt_usb_id = None) -> None:
|
||||
log.info(f" Scanning MACs: {mac_list}")
|
||||
test_list = mac_list
|
||||
# History buffer – keep the last N snapshots (N=5)
|
||||
print("Creating histor variable")
|
||||
history = deque(maxlen=5)
|
||||
prev_list_snapshot = None
|
||||
while not test_result:
|
||||
# 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")
|
||||
history.clear()
|
||||
history.append(current_list)
|
||||
if len(history) == 5 and all(lst == history[0] for lst in history):
|
||||
|
||||
Reference in new issue
Block a user