|
|
|
@ -58,9 +58,6 @@ class CarState(CarStateBase): |
|
|
|
|
ret.cruiseState.available = cp_cruise.vl["CruiseControl"]["Cruise_On"] != 0 |
|
|
|
|
ret.cruiseState.speed = cp_cam.vl["ES_DashStatus"]["Cruise_Set_Speed"] * CV.KPH_TO_MS |
|
|
|
|
|
|
|
|
|
if self.car_fingerprint not in PREGLOBAL_CARS: |
|
|
|
|
ret.cruiseState.standstill = cp_cam.vl["ES_DashStatus"]["Cruise_State"] == 3 |
|
|
|
|
|
|
|
|
|
if (self.car_fingerprint in PREGLOBAL_CARS and cp.vl["Dash_State2"]["UNITS"] == 1) or \ |
|
|
|
|
(self.car_fingerprint not in PREGLOBAL_CARS and cp.vl["Dashlights"]["UNITS"] == 1): |
|
|
|
|
ret.cruiseState.speed *= CV.MPH_TO_KPH |
|
|
|
@ -78,6 +75,8 @@ class CarState(CarStateBase): |
|
|
|
|
else: |
|
|
|
|
ret.steerFaultTemporary = cp.vl["Steering_Torque"]["Steer_Warning"] == 1 |
|
|
|
|
ret.cruiseState.nonAdaptive = cp_cam.vl["ES_DashStatus"]["Conventional_Cruise"] == 1 |
|
|
|
|
ret.cruiseState.standstill = cp_cam.vl["ES_DashStatus"]["Cruise_State"] == 3 |
|
|
|
|
ret.stockFcw = cp_cam.vl["ES_LKAS_State"]["LKAS_Alert"] == 2 |
|
|
|
|
self.es_lkas_msg = copy.copy(cp_cam.vl["ES_LKAS_State"]) |
|
|
|
|
|
|
|
|
|
cp_es_distance = cp_body if self.car_fingerprint in GLOBAL_GEN2 else cp_cam |
|
|
|
|