calibrationd: reset calibration when the car changes (#39171)

This commit is contained in:
Shane Smiskol
2026-11-02 06:35:35 +00:00
committed by firestar5683
parent 25830237de
commit 7d6cf4e387
@@ -270,6 +270,12 @@ def main() -> NoReturn:
params_reader = Params()
CP = messaging.log_from_bytes(params_reader.get("CarParams", block=True), car.CarParams)
last_carparams_data = params_reader.get("CarParamsPrevRoute")
if last_carparams_data is not None:
with car.CarParams.from_bytes(last_carparams_data) as last_CP:
if last_CP.carFingerprint != CP.carFingerprint:
params_reader.remove("CalibrationParams")
calibrator = Calibrator(param_put=True)
calibrator.not_car = CP.notCar