From 87c88e00676dfd9f622aa65821e164f11d5ff65a Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 1 Feb 2024 11:21:28 +0100 Subject: [PATCH] allow sending 0x131, STEERING_LTA_2 --- board/safety/safety_toyota.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/board/safety/safety_toyota.h b/board/safety/safety_toyota.h index 25c04fe75f..edba3db222 100644 --- a/board/safety/safety_toyota.h +++ b/board/safety/safety_toyota.h @@ -46,7 +46,7 @@ const int TOYOTA_GAS_INTERCEPTOR_THRSLD = 805; #define TOYOTA_COMMON_TX_MSGS \ {0x283, 0, 7}, {0x2E6, 0, 8}, {0x2E7, 0, 8}, {0x33E, 0, 7}, {0x344, 0, 8}, {0x365, 0, 7}, {0x366, 0, 7}, {0x4CB, 0, 8}, /* DSU bus 0 */ \ {0x128, 1, 6}, {0x141, 1, 4}, {0x160, 1, 8}, {0x161, 1, 7}, {0x470, 1, 4}, /* DSU bus 1 */ \ - {0x2E4, 0, 5}, {0x2E4, 0, 8}, {0x191, 0, 8}, {0x411, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + ACC */ \ + {0x2E4, 0, 5}, {0x2E4, 0, 8}, {0x131, 0, 8}, {0x191, 0, 8}, {0x411, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + ACC */ \ const CanMsg TOYOTA_TX_MSGS[] = { TOYOTA_COMMON_TX_MSGS @@ -267,6 +267,14 @@ static bool toyota_tx_hook(const CANPacket_t *to_send) { } } + // LTA angle steering check for SecOC cars + if (addr == 0x131) { + // Block any form of actuation for now + if (GET_BYTE(to_send, 0)) { + tx = false; + } + } + // LTA angle steering check if (addr == 0x191) { // check the STEER_REQUEST, STEER_REQUEST_2, TORQUE_WIND_DOWN, STEER_ANGLE_CMD signals