Skip to content

Commit

Permalink
HKG CAN-FD: log brake errors/ACC faults (#26781)
Browse files Browse the repository at this point in the history
* log brake_error

* bumpopendbc

* add signal to can parser
  • Loading branch information
sshane committed Dec 13, 2022
1 parent 1e596f9 commit 72bf819
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opendbc
Submodule opendbc updated 1 files
+3 −0 hyundai_canfd.dbc
2 changes: 2 additions & 0 deletions selfdrive/car/hyundai/carstate.py
Expand Up @@ -213,6 +213,7 @@ def update_canfd(self, cp, cp_cam):
self.cruise_buttons.extend(cp.vl_all[cruise_btn_msg]["CRUISE_BUTTONS"])
self.main_buttons.extend(cp.vl_all[cruise_btn_msg]["ADAPTIVE_CRUISE_MAIN_BTN"])
self.buttons_counter = cp.vl[cruise_btn_msg]["COUNTER"]
self.brake_error = cp.vl["TCS"]["ACCEnable"] != 0 # 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED

if self.CP.flags & HyundaiFlags.CANFD_HDA2:
self.cam_0x2a4 = copy.copy(cp_cam.vl["CAM_0x2a4"])
Expand Down Expand Up @@ -434,6 +435,7 @@ def get_can_parser_canfd(CP):
("LKA_FAULT", "MDPS"),

("DriverBraking", "TCS"),
("ACCEnable", "TCS"),

("COUNTER", cruise_btn_msg),
("CRUISE_BUTTONS", cruise_btn_msg),
Expand Down

0 comments on commit 72bf819

Please sign in to comment.