From 7f3a965aa2a174623befd7d3d78cb05fa89ea85a Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Wed, 19 Jun 2024 19:31:25 -0400 Subject: [PATCH] Wrong key --- selfdrive/car/hyundai/carstate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 77b13d6930..f99499e749 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -120,9 +120,10 @@ class CarState(CarStateBase): cruise_available_msg = "E_CRUISE_CONTROL" if self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) else "EMS16" cruise_enabled_msg = "E_CRUISE_CONTROL" if self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) else "LVR12" cruise_speed_msg = "ELECT_GEAR" if self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) else "LVR12" + cruise_speed_sig = "VSetDis" if self.CP.flags & (HyundaiFlags.HYBRID | HyundaiFlags.EV) else "CF_Lvr_CruiseSet" ret.cruiseState.available = cp.vl[cruise_available_msg]["CRUISE_LAMP_M"] != 0 ret.cruiseState.enabled = cp.vl[cruise_enabled_msg]["CF_Lvr_CruiseSet"] != 0 - ret.cruiseState.speed = cp.vl[cruise_speed_msg]["CF_Lvr_CruiseSet"] * speed_conv + ret.cruiseState.speed = cp.vl[cruise_speed_msg][cruise_speed_sig] * speed_conv ret.cruiseState.standstill = False ret.cruiseState.nonAdaptive = False else: