From 7d6cf4e3872054c0a148e94287a1294d92df6a90 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 2 Nov 2026 06:35:35 +0000 Subject: [PATCH] calibrationd: reset calibration when the car changes (#39171) --- openpilot/selfdrive/locationd/calibrationd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/openpilot/selfdrive/locationd/calibrationd.py b/openpilot/selfdrive/locationd/calibrationd.py index babb0981b0..b585f4ffb8 100755 --- a/openpilot/selfdrive/locationd/calibrationd.py +++ b/openpilot/selfdrive/locationd/calibrationd.py @@ -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