|
|
|
@ -201,14 +201,14 @@ class CarState(CarStateBase): |
|
|
|
|
ret.rightBlindspot = cp.vl["BLINDSPOTS_REAR_CORNERS"]["FR_INDICATOR"] != 0 |
|
|
|
|
|
|
|
|
|
# cruise state |
|
|
|
|
# CAN FD cars enable on main button press, set available if no TCS faults preventing engagement |
|
|
|
|
ret.cruiseState.available = cp.vl["TCS"]["ACCEnable"] == 0 |
|
|
|
|
if self.CP.openpilotLongitudinalControl: |
|
|
|
|
# These are not used for engage/disengage since openpilot keeps track of state using the buttons |
|
|
|
|
ret.cruiseState.available = cp.vl["TCS"]["ACCEnable"] == 0 |
|
|
|
|
ret.cruiseState.enabled = cp.vl["TCS"]["ACC_REQ"] == 1 |
|
|
|
|
ret.cruiseState.standstill = False |
|
|
|
|
else: |
|
|
|
|
cp_cruise_info = cp_cam if self.CP.flags & HyundaiFlags.CANFD_CAMERA_SCC else cp |
|
|
|
|
ret.cruiseState.available = cp_cruise_info.vl["SCC_CONTROL"]["MainMode_ACC"] == 1 |
|
|
|
|
ret.cruiseState.enabled = cp_cruise_info.vl["SCC_CONTROL"]["ACCMode"] in (1, 2) |
|
|
|
|
ret.cruiseState.standstill = cp_cruise_info.vl["SCC_CONTROL"]["CRUISE_STANDSTILL"] == 1 |
|
|
|
|
ret.cruiseState.speed = cp_cruise_info.vl["SCC_CONTROL"]["VSetDis"] * speed_factor |
|
|
|
@ -484,7 +484,6 @@ class CarState(CarStateBase): |
|
|
|
|
("ACCMode", "SCC_CONTROL"), |
|
|
|
|
("VSetDis", "SCC_CONTROL"), |
|
|
|
|
("CRUISE_STANDSTILL", "SCC_CONTROL"), |
|
|
|
|
("MainMode_ACC", "SCC_CONTROL"), |
|
|
|
|
] |
|
|
|
|
checks += [ |
|
|
|
|
("SCC_CONTROL", 50), |
|
|
|
|