mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-11-04 19:43:49 +08:00
calibrationd: reset calibration when the car changes (#39171)
This commit is contained in:
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user