From 3abc34253589ca16aa369ddb4880d4e6259f6003 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 3 Sep 2024 19:22:03 -0700 Subject: [PATCH 1/3] ret it now --- opendbc/car/car_helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opendbc/car/car_helpers.py b/opendbc/car/car_helpers.py index a5a500bbdd..8199dd770e 100644 --- a/opendbc/car/car_helpers.py +++ b/opendbc/car/car_helpers.py @@ -150,8 +150,8 @@ def fingerprint(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_mu def get_car_interface(CP: CarParams): - CarInterface, CarController, CarState, _ = interfaces[CP.carFingerprint] - return CarInterface(CP, CarController, CarState) + CarInterface, CarController, CarState, RadarInterface = interfaces[CP.carFingerprint] + return CarInterface(CP, CarController, CarState), RadarInterface(CP) def get_car(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_multiplexing: ObdCallback, experimental_long_allowed: bool, From 016e40e0085decd89decad1efadd8641f017372d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 5 Sep 2024 14:09:35 -0700 Subject: [PATCH 2/3] don't forget --- opendbc/car/panda_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendbc/car/panda_runner.py b/opendbc/car/panda_runner.py index 598ff51e4a..e065726fe8 100644 --- a/opendbc/car/panda_runner.py +++ b/opendbc/car/panda_runner.py @@ -13,7 +13,7 @@ def __enter__(self): # setup + fingerprinting self.p.set_safety_mode(Panda.SAFETY_ELM327, 1) - self.CI = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True) + self.CI, _ = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True) assert self.CI.CP.carFingerprint.lower() != "mock", "Unable to identify car. Check connections and ensure car is supported." safety_model = list(CarParams.SafetyModel).index(self.CI.CP.safetyConfigs[0].safetyModel) From 3a0cd2463329cc13135aa1be751fdefe86a46b4d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 5 Sep 2024 14:10:08 -0700 Subject: [PATCH 3/3] better --- opendbc/car/car_helpers.py | 9 +++++++-- opendbc/car/panda_runner.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/opendbc/car/car_helpers.py b/opendbc/car/car_helpers.py index 8199dd770e..9d518be4d2 100644 --- a/opendbc/car/car_helpers.py +++ b/opendbc/car/car_helpers.py @@ -150,8 +150,13 @@ def fingerprint(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_mu def get_car_interface(CP: CarParams): - CarInterface, CarController, CarState, RadarInterface = interfaces[CP.carFingerprint] - return CarInterface(CP, CarController, CarState), RadarInterface(CP) + CarInterface, CarController, CarState, _ = interfaces[CP.carFingerprint] + 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, diff --git a/opendbc/car/panda_runner.py b/opendbc/car/panda_runner.py index e065726fe8..598ff51e4a 100644 --- a/opendbc/car/panda_runner.py +++ b/opendbc/car/panda_runner.py @@ -13,7 +13,7 @@ def __enter__(self): # setup + fingerprinting self.p.set_safety_mode(Panda.SAFETY_ELM327, 1) - self.CI, _ = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True) + self.CI = get_car(self._can_recv, self.p.can_send_many, self.p.set_obd, True) assert self.CI.CP.carFingerprint.lower() != "mock", "Unable to identify car. Check connections and ensure car is supported." safety_model = list(CarParams.SafetyModel).index(self.CI.CP.safetyConfigs[0].safetyModel)