From 9d4ca82620e15f1613c65e082031ee820f14aea3 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Fri, 23 Feb 2024 09:34:25 -0800 Subject: [PATCH] but this should be done first and thats subaru specific --- selfdrive/car/interfaces.py | 4 ++-- selfdrive/car/subaru/interface.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) 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')