mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-07 06:32:08 +08:00
Hyundai CAN-FD: use cruise signals from SCC ECU (#26171)
* Hyundai CAN-FD: use cruise signals from SCC ECU * bump panda * bumppanda * update refs old-commit-hash: eaedfb9a66012b82091c4b602184a0078d7f0c25
This commit is contained in:
+1
-1
Submodule panda updated: dd751862c3...723e60cb43
@@ -189,13 +189,13 @@ class CarState(CarStateBase):
|
||||
cp.vl["BLINKERS"]["RIGHT_LAMP"])
|
||||
|
||||
ret.cruiseState.available = True
|
||||
ret.cruiseState.enabled = cp.vl["SCC1"]["CRUISE_ACTIVE"] == 1
|
||||
self.is_metric = cp.vl["CLUSTER_INFO"]["DISTANCE_UNIT"] != 1
|
||||
if not self.CP.openpilotLongitudinalControl:
|
||||
speed_factor = CV.KPH_TO_MS if self.is_metric else CV.MPH_TO_MS
|
||||
cp_cruise_info = cp if self.CP.flags & HyundaiFlags.CANFD_HDA2 else cp_cam
|
||||
ret.cruiseState.speed = cp_cruise_info.vl["CRUISE_INFO"]["SET_SPEED"] * speed_factor
|
||||
ret.cruiseState.standstill = cp_cruise_info.vl["CRUISE_INFO"]["CRUISE_STANDSTILL"] == 1
|
||||
ret.cruiseState.enabled = cp_cruise_info.vl["CRUISE_INFO"]["CRUISE_STATUS"] != 0
|
||||
self.cruise_info = copy.copy(cp_cruise_info.vl["CRUISE_INFO"])
|
||||
|
||||
cruise_btn_msg = "CRUISE_BUTTONS_ALT" if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS else "CRUISE_BUTTONS"
|
||||
@@ -452,6 +452,7 @@ class CarState(CarStateBase):
|
||||
|
||||
if CP.flags & HyundaiFlags.CANFD_HDA2 and not CP.openpilotLongitudinalControl:
|
||||
signals += [
|
||||
("CRUISE_STATUS", "CRUISE_INFO"),
|
||||
("SET_SPEED", "CRUISE_INFO"),
|
||||
("CRUISE_STANDSTILL", "CRUISE_INFO"),
|
||||
]
|
||||
|
||||
@@ -1 +1 @@
|
||||
a87455caf93e91fae0f3704aa476e0732d066b77
|
||||
1f41cd8bbf2431ae89c489a81698120d14a44145
|
||||
Reference in New Issue
Block a user