From 0bf00410d4f32c732ac37fd2d393844dc7fa6101 Mon Sep 17 00:00:00 2001 From: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com> Date: Mon, 27 Mar 2023 22:05:35 -0400 Subject: [PATCH] Hyundai: gate speed limit parsing availability (#144) --- selfdrive/car/hyundai/carstate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index bfe01cd3f5..8b919ad3ac 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -175,8 +175,9 @@ class CarState(CarStateBase): self.cruise_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwState"]) self.main_buttons.extend(cp.vl_all["CLU11"]["CF_Clu_CruiseSwMain"]) - self._update_traffic_signals(self.CP, cp, cp_cam) - ret.cruiseState.speedLimit = self._calculate_speed_limit() * speed_conv + if self.CP.flags & HyundaiFlags.SP_NAV_MSG: + self._update_traffic_signals(self.CP, cp, cp_cam) + ret.cruiseState.speedLimit = self._calculate_speed_limit() * speed_conv return ret