From 4e3b1f1f6b2193fb090ec777c1ffdcd502635b93 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 24 Oct 2025 14:56:24 -0400 Subject: [PATCH] interface: add `is_release` flag to `get_params_sp` (#1426) * interface: add `is_release` flag to `get_params_sp` * split and rename * debump --- selfdrive/car/card.py | 3 ++- selfdrive/car/tests/test_models.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/card.py b/selfdrive/car/card.py index 4c44e4328..6758432b6 100755 --- a/selfdrive/car/card.py +++ b/selfdrive/car/card.py @@ -88,6 +88,7 @@ class Car: self.can_callbacks = can_comm_callbacks(self.can_sock, self.pm.sock['sendcan']) is_release = self.params.get_bool("IsReleaseBranch") + is_release_sp = self.params.get_bool("IsReleaseSpBranch") if CI is None: # wait for one pandaState and one CAN packet @@ -110,7 +111,7 @@ class Car: init_params_list_sp = sunnypilot_interfaces.initialize_params(self.params) self.CI = get_car(*self.can_callbacks, obd_callback(self.params), alpha_long_allowed, is_release, num_pandas, cached_params, - fixed_fingerprint, init_params_list_sp) + fixed_fingerprint, init_params_list_sp, is_release_sp) sunnypilot_interfaces.setup_interfaces(self.CI, self.params) self.RI = interfaces[self.CI.CP.carFingerprint].RadarInterface(self.CI.CP, self.CI.CP_SP) self.CP = self.CI.CP diff --git a/selfdrive/car/tests/test_models.py b/selfdrive/car/tests/test_models.py index 4f61ad3c3..48da4b1ce 100644 --- a/selfdrive/car/tests/test_models.py +++ b/selfdrive/car/tests/test_models.py @@ -151,7 +151,7 @@ class TestCarModelBase(unittest.TestCase): cls.CarInterface = interfaces[cls.platform] cls.CP = cls.CarInterface.get_params(cls.platform, cls.fingerprint, car_fw, alpha_long, False, docs=False) - cls.CP_SP = cls.CarInterface.get_params_sp(cls.CP, cls.platform, cls.fingerprint, car_fw, alpha_long, docs=False) + cls.CP_SP = cls.CarInterface.get_params_sp(cls.CP, cls.platform, cls.fingerprint, car_fw, alpha_long, False, docs=False) assert cls.CP assert cls.CP_SP assert cls.CP.carFingerprint == cls.platform