|
|
@ -7,7 +7,7 @@ from common.basedir import BASEDIR |
|
|
|
from system.version import is_comma_remote, is_tested_branch |
|
|
|
from system.version import is_comma_remote, is_tested_branch |
|
|
|
from selfdrive.car.interfaces import get_interface_attr |
|
|
|
from selfdrive.car.interfaces import get_interface_attr |
|
|
|
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars |
|
|
|
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars |
|
|
|
from selfdrive.car.vin import get_vin, VIN_UNKNOWN |
|
|
|
from selfdrive.car.vin import get_vin, is_valid_vin, VIN_UNKNOWN |
|
|
|
from selfdrive.car.fw_versions import get_fw_versions_ordered, match_fw_to_car, get_present_ecus |
|
|
|
from selfdrive.car.fw_versions import get_fw_versions_ordered, match_fw_to_car, get_present_ecus |
|
|
|
from system.swaglog import cloudlog |
|
|
|
from system.swaglog import cloudlog |
|
|
|
import cereal.messaging as messaging |
|
|
|
import cereal.messaging as messaging |
|
|
@ -106,7 +106,7 @@ def fingerprint(logcan, sendcan): |
|
|
|
vin, vin_rx_addr = VIN_UNKNOWN, 0 |
|
|
|
vin, vin_rx_addr = VIN_UNKNOWN, 0 |
|
|
|
exact_fw_match, fw_candidates, car_fw = True, set(), [] |
|
|
|
exact_fw_match, fw_candidates, car_fw = True, set(), [] |
|
|
|
|
|
|
|
|
|
|
|
if len(vin) != 17: |
|
|
|
if not is_valid_vin(vin): |
|
|
|
cloudlog.event("Malformed VIN", vin=vin, error=True) |
|
|
|
cloudlog.event("Malformed VIN", vin=vin, error=True) |
|
|
|
vin = VIN_UNKNOWN |
|
|
|
vin = VIN_UNKNOWN |
|
|
|
cloudlog.warning("VIN %s", vin) |
|
|
|
cloudlog.warning("VIN %s", vin) |
|
|
|