fix timeout for flipper connection

This commit is contained in:
2026-01-30 00:10:58 +03:00
parent 9a3fe4457c
commit aab373cc0f
2 changed files with 6 additions and 19 deletions

View File

@@ -66,9 +66,12 @@ class OBD2Scanner:
"""
import time
if use_cache and self._load_cache():
self._logger.info(f"Loaded {len(self._supported_pids)} PIDs from cache")
return self.supported_pids
if use_cache:
if self._load_cache() and len(self._supported_pids) > 0:
self._logger.info(f"Loaded {len(self._supported_pids)} PIDs from cache")
return self.supported_pids
else:
self._logger.debug("Cache empty or invalid, will scan")
# Initial delay to let CAN interface and ECU stabilize
if initial_delay > 0: