Skip to content

Commit

Permalink
allow sending 0x131, STEERING_LTA_2
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Feb 1, 2024
1 parent b0ca800 commit 87c88e0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 87c88e0

Please sign in to comment.