print line cleanup 3
This commit is contained in:
1 parent
f00ba3fefc
commit
55f30af700
2 files changed
+3
-5
No files matched your search
@@ -43,14 +43,14 @@ async def read_data(mac_address):
|
||||
success = False
|
||||
# Check if Mi service is available
|
||||
|
||||
print("?? Waiting on client to connect...")
|
||||
print("-- Waiting on client to connect...")
|
||||
while not client.is_connected:
|
||||
await asyncio.sleep(0.1)
|
||||
while not success:
|
||||
try:
|
||||
print("..Client connected, getting services")
|
||||
print(".. Client connected, getting services")
|
||||
services = client.services
|
||||
print("..Services acquired, loading uuid matches")
|
||||
print(".. Services acquired, loading uuid matches")
|
||||
mi_service = next((s for s in services if s.uuid.lower() == MI_SERVICE_UUID.lower()), None)
|
||||
success = True
|
||||
#print("uuid matches loaded")
|
||||
|
||||
@@ -36,7 +36,6 @@ def save_state() -> None:
|
||||
try:
|
||||
with open(STATE_FILE, "wb") as f:
|
||||
pickle.dump(state, f, protocol=pickle.HIGHEST_PROTOCOL)
|
||||
if debug_output:
|
||||
print("[Scanner] State persisted to", STATE_FILE)
|
||||
except Exception as exc:
|
||||
# Don't crash the app – just log the error
|
||||
@@ -58,7 +57,6 @@ def load_state() -> None:
|
||||
_mac_cache.update(state.get("mac_cache", []))
|
||||
global _sensors_cache
|
||||
_sensors_cache = state.get("sensors", [])
|
||||
if debug_output:
|
||||
print("[Scanner] Loaded state from", STATE_FILE)
|
||||
except Exception as exc:
|
||||
print("[Scanner] Warning: could not load state:", exc)
|
||||
|
||||
Reference in new issue
Block a user