ble.py - purge some emdashes
This commit is contained in:
1 parent
88848f75c8
commit
ac651cf4f2
1 file changed
+6
-6
+6
-6
@@ -47,7 +47,7 @@ current_usb_id = None
|
||||
_logger = logging.getLogger(__name__)
|
||||
_logger.setLevel(logging.INFO)
|
||||
|
||||
# Stream (stdout) handler – always present
|
||||
# Stream (stdout) handler - always present
|
||||
_stdout_handler = logging.StreamHandler(sys.stdout)
|
||||
_stdout_handler.setFormatter(
|
||||
logging.Formatter(
|
||||
@@ -289,7 +289,7 @@ def test(test_count = 0, bt_usb_id = None) -> None:
|
||||
log.info("Starting BLE test...")
|
||||
log.info(f" Scanning MACs: {mac_list}")
|
||||
test_list = mac_list
|
||||
# History buffer – keep the last N snapshots (N=5)
|
||||
# History buffer - keep the last N snapshots (N=5)
|
||||
print("Creating histor variable")
|
||||
history = deque(maxlen=5)
|
||||
prev_list_snapshot = None
|
||||
@@ -297,12 +297,12 @@ 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")
|
||||
# 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")
|
||||
# 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