Force fingerprint function
This commit is contained in:
@@ -239,13 +239,21 @@ def crash_log(candidate):
|
||||
|
||||
def get_car(logcan, sendcan, experimental_long_allowed, num_pandas=1):
|
||||
params = Params()
|
||||
car_brand = params.get("CarMake", encoding='utf-8')
|
||||
car_model = params.get("CarModel", encoding='utf-8')
|
||||
dongle_id = params.get("DongleId", block=True, encoding='utf-8')
|
||||
|
||||
candidate, fingerprints, vin, car_fw, source, exact_match = fingerprint(logcan, sendcan, num_pandas)
|
||||
|
||||
if candidate is None:
|
||||
cloudlog.event("car doesn't match any fingerprints", fingerprints=fingerprints, error=True)
|
||||
candidate = "mock"
|
||||
if car_model is not None:
|
||||
candidate = car_model
|
||||
else:
|
||||
cloudlog.event("Car doesn't match any fingerprints", fingerprints=fingerprints, error=True)
|
||||
candidate = "mock"
|
||||
else:
|
||||
params.put("CarMake", candidate.split(' ')[0].title())
|
||||
params.put("CarModel", candidate)
|
||||
|
||||
if get_branch() == "origin/FrogPilot-Development" and dongle_id[:3] != "be6":
|
||||
candidate = "mock"
|
||||
|
||||
Reference in New Issue
Block a user