Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyundai CAN Longitudinal: Enable for Camera SCC cars #1107

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
move around
  • Loading branch information
sunnyhaibin committed Sep 25, 2024
commit 4d1cf90d6e230ccd0acfc0fbde7f8b0985f294eb
4 changes: 2 additions & 2 deletions board/safety/safety_hyundai.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ static int hyundai_fwd_hook(int bus_num, int addr) {
if (bus_num == 2) {
bool is_lkas11_msg = (addr == 0x340);
bool is_lfahda_mfc_msg = (addr == 0x485);
bool is_scc_msg = ((addr == 0x420) || (addr == 0x421) || (addr == 0x50A) || (addr == 0x389)) && hyundai_longitudinal && hyundai_camera_scc;
bool is_scc_msg = (addr == 0x420) || (addr == 0x421) || (addr == 0x50A) || (addr == 0x389);

bool block_msg = is_lkas11_msg || is_lfahda_mfc_msg || is_scc_msg;
bool block_msg = is_lkas11_msg || is_lfahda_mfc_msg || (is_scc_msg && hyundai_longitudinal && hyundai_camera_scc);
if (!block_msg) {
bus_fwd = 0;
}
Expand Down