Wrong key

This commit is contained in:
Jason Wen
2024-06-19 19:31:25 -04:00
parent b1f4d05051
commit 7f3a965aa2
+2 -1
View File
@@ -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: