diff --git a/board/safety/safety_gm.h b/board/safety/safety_gm.h index 80aafef428..634928de5b 100644 --- a/board/safety/safety_gm.h +++ b/board/safety/safety_gm.h @@ -28,7 +28,7 @@ const CanMsg GM_ASCM_TX_MSGS[] = {{384, 0, 4}, {1033, 0, 7}, {1034, 0, 7}, {715, {0x104c006c, 3, 3}, {0x10400060, 3, 5}}; // gmlan const CanMsg GM_CAM_TX_MSGS[] = {{384, 0, 4}, // pt bus - {481, 2, 7}}; // camera bus + {481, 2, 7}, {388, 2, 8}}; // camera bus // TODO: do checksum and counter checks. Add correct timestep, 0.1s for now. AddrCheckStruct gm_addr_checks[] = { @@ -260,13 +260,17 @@ static int gm_fwd_hook(int bus_num, CANPacket_t *to_fwd) { int bus_fwd = -1; if (gm_hw == GM_CAM) { + int addr = GET_ADDR(to_fwd); if (bus_num == 0) { - bus_fwd = 2; + // block PSCMStatus; forwarded through openpilot to hide an alert from the camera + bool is_pscm_msg = (addr == 388); + if (!is_pscm_msg) { + bus_fwd = 2; + } } if (bus_num == 2) { // block lkas message, forward all others - int addr = GET_ADDR(to_fwd); bool is_lkas_msg = (addr == 384); if (!is_lkas_msg) { bus_fwd = 0; diff --git a/tests/safety/test_gm.py b/tests/safety/test_gm.py index 60ddfb99cd..019b84afda 100755 --- a/tests/safety/test_gm.py +++ b/tests/safety/test_gm.py @@ -208,8 +208,9 @@ def test_cancel_button(self): class TestGmCameraSafety(TestGmSafetyBase): - TX_MSGS = [[384, 0]] # pt bus - FWD_BLACKLISTED_ADDRS = {2: [384]} # LKAS message, ACC messages are (715, 880, 789) + TX_MSGS = [[384, 0], # pt bus + [388, 2]] # camera bus + FWD_BLACKLISTED_ADDRS = {2: [384], 0: [388]} # block LKAS message and PSCMStatus FWD_BUS_LOOKUP = {0: 2, 2: 0} BUTTONS_BUS = 2 # tx only USER_BRAKE_THRESHOLD = 20