mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-03 19:29:24 +08:00
MADS: HKG CAN-FD: Disallow cruise buttons to engage when pcmCruiseSpeed is off
This commit is contained in:
@@ -282,6 +282,8 @@ class CarState(CarStateBase):
|
||||
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 if not self.CP.pcmCruiseSpeed else \
|
||||
ret.cruiseState.available
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user