diff --git a/selfdrive/car/interfaces.py b/selfdrive/car/interfaces.py index 22d42549e9..2b0b148ccf 100644 --- a/selfdrive/car/interfaces.py +++ b/selfdrive/car/interfaces.py @@ -109,7 +109,6 @@ class CarInterfaceBase(ABC): @classmethod def get_params(cls, candidate: str, fingerprint: Dict[int, Dict[int, int]], car_fw: List[car.CarParams.CarFw], experimental_long: bool, docs: bool): ret = CarInterfaceBase.get_std_params(candidate) - ret = cls._get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs) if hasattr(candidate, "config"): platform_config = cast(PlatformConfig, candidate.config) @@ -117,7 +116,8 @@ class CarInterfaceBase(ABC): ret.mass = platform_config.specs.mass ret.wheelbase = platform_config.specs.wheelbase ret.steerRatio = platform_config.specs.steerRatio - ret.centerToFront = ret.wheelbase * 0.5 + + ret = cls._get_params(ret, candidate, fingerprint, car_fw, experimental_long, docs) # Vehicle mass is published curb weight plus assumed payload such as a human driver; notCars have no assumed payload if not ret.notCar: diff --git a/selfdrive/car/subaru/interface.py b/selfdrive/car/subaru/interface.py index d13c90e7e6..edf07ac2ef 100644 --- a/selfdrive/car/subaru/interface.py +++ b/selfdrive/car/subaru/interface.py @@ -40,6 +40,9 @@ class CarInterface(CarInterfaceBase): else: CarInterfaceBase.configure_torque_tune(candidate, ret.lateralTuning) + + ret.centerToFront = ret.wheelbase * 0.5 + if candidate in (CAR.ASCENT, CAR.ASCENT_2023): ret.steerActuatorDelay = 0.3 # end-to-end angle controller ret.lateralTuning.init('pid')