mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-25 18:32:06 +08:00
Adding error checking to only use the cached fp if they're valid (#1182)
old-commit-hash: 5e9daf2471
This commit is contained in:
@@ -76,7 +76,7 @@ def fingerprint(logcan, sendcan, has_relay):
|
||||
if cached_params.carName == "mock":
|
||||
cached_params = None
|
||||
|
||||
if cached_params is not None:
|
||||
if cached_params is not None and len(cached_params.carFw) > 0 and cached_params.carVin is not VIN_UNKNOWN:
|
||||
cloudlog.warning("Using cached CarParams")
|
||||
vin = cached_params.carVin
|
||||
car_fw = list(cached_params.carFw)
|
||||
|
||||
Reference in New Issue
Block a user