From 3dde38359331c70ea7a3d0749eebb0e7704ddaae Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 5 Sep 2024 14:15:40 -0700 Subject: [PATCH] Radar interface getter (#1220) * ret it now * don't forget * better --- opendbc/car/car_helpers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opendbc/car/car_helpers.py b/opendbc/car/car_helpers.py index a5a500bbdd..9d518be4d2 100644 --- a/opendbc/car/car_helpers.py +++ b/opendbc/car/car_helpers.py @@ -154,6 +154,11 @@ def get_car_interface(CP: CarParams): return CarInterface(CP, CarController, CarState) +def get_radar_interface(CP: CarParams): + _, _, _, RadarInterface = interfaces[CP.carFingerprint] + return RadarInterface(CP) + + def get_car(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_multiplexing: ObdCallback, experimental_long_allowed: bool, num_pandas: int = 1, cached_params: CarParams | None = None): candidate, fingerprints, vin, car_fw, source, exact_match = fingerprint(can_recv, can_send, set_obd_multiplexing, num_pandas, cached_params)