From 417968212b930c2fa513d4b386221659f306b275 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Tue, 29 Aug 2023 10:53:21 -0700 Subject: [PATCH] Parser: assert no duplicate message checks (#29696) * assert no duplicate checks * bump * remove duplicates * are both messages present? * guess we need this extra check * this makes it more clear * bump opendbc * fix preglobal old-commit-hash: 5f0729791ab6bdb22b3e971f0153a88441f8831a --- opendbc | 2 +- selfdrive/car/hyundai/carstate.py | 6 +++++- selfdrive/car/subaru/carstate.py | 1 - selfdrive/car/subaru/subarucan.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/opendbc b/opendbc index 814763889..034ca989b 160000 --- a/opendbc +++ b/opendbc @@ -1 +1 @@ -Subproject commit 814763889df3d1f19112a9628dfb4d1f17c0c533 +Subproject commit 034ca989bd19e1dc2f6f5be903c037bc1aca750a diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index ee35bf666..7a3c59e8d 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -305,7 +305,6 @@ class CarState(CarStateBase): def get_can_parser_canfd(self, CP): messages = [ (self.gear_msg_canfd, 100), - (self.cruise_btns_msg_canfd, 50), (self.accelerator_msg_canfd, 100), ("WHEEL_SPEEDS", 100), ("STEERING_SENSORS", 100), @@ -316,6 +315,11 @@ class CarState(CarStateBase): ("DOORS_SEATBELTS", 4), ] + if not (CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS): + messages += [ + ("CRUISE_BUTTONS", 50) + ] + if CP.enableBsm: messages += [ ("BLINDSPOTS_REAR_CORNERS", 20), diff --git a/selfdrive/car/subaru/carstate.py b/selfdrive/car/subaru/carstate.py index 027f317a0..c8a6dfe1e 100644 --- a/selfdrive/car/subaru/carstate.py +++ b/selfdrive/car/subaru/carstate.py @@ -150,7 +150,6 @@ class CarState(CarStateBase): ("CruiseControl", 50), ("Wheel_Speeds", 50), ("Dash_State2", 1), - ("Dashlights", 10), ] return messages diff --git a/selfdrive/car/subaru/subarucan.py b/selfdrive/car/subaru/subarucan.py index 79ff3c8c5..0f297d963 100644 --- a/selfdrive/car/subaru/subarucan.py +++ b/selfdrive/car/subaru/subarucan.py @@ -261,7 +261,7 @@ def create_preglobal_es_distance(packer, cruise_button, es_distance_msg): "Signal1", "Car_Follow", "Signal2", - "Brake_On", + "Cruise_Brake_Active", "Distance_Swap", "Standstill", "Signal3",