Skip to content

Commit

Permalink
don't allow short version of 0x2E5 for SecOC mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jyoung8607 committed Oct 2, 2024
1 parent 7b0a20c commit 655abf5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
#include "safety_declarations.h"

// Stock longitudinal
// TODO: don't allow 0x2E4, 0, 5 for SecOC?
#define TOYOTA_COMMON_TX_MSGS \
{0x2E4, 0, 5}, {0x191, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + LTA + ACC & PCM cancel cmds */ \
#define TOYOTA_BASE_TX_MSGS \
{0x191, 0, 8}, {0x412, 0, 8}, {0x343, 0, 8}, {0x1D2, 0, 8}, /* LKAS + LTA + ACC & PCM cancel cmds */ \

#define TOYOTA_COMMON_TX_MSGS \
TOYOTA_BASE_TX_MSGS \
{0x2E4, 0, 5}, \

#define TOYOTA_COMMON_SECOC_TX_MSGS \
TOYOTA_COMMON_TX_MSGS \
TOYOTA_BASE_TX_MSGS \
{0x2E4, 0, 8}, {0x131, 0, 8}, \

#define TOYOTA_COMMON_LONG_TX_MSGS \
Expand All @@ -21,8 +24,8 @@
#define TOYOTA_COMMON_RX_CHECKS(lta) \
{.msg = {{ 0xaa, 0, 8, .check_checksum = false, .frequency = 83U}, { 0 }, { 0 }}}, \
{.msg = {{0x260, 0, 8, .check_checksum = true, .quality_flag = (lta), .frequency = 50U}, { 0 }, { 0 }}}, \
{.msg = {{0x1D2, 0, 8, .check_checksum = true, .frequency = 33U},
{0x176, 0, 8, .check_checksum = true, .frequency = 32U}, { 0 }}},\
{.msg = {{0x1D2, 0, 8, .check_checksum = true, .frequency = 33U}, \
{0x176, 0, 8, .check_checksum = true, .frequency = 32U}, { 0 }}}, \
{.msg = {{0x101, 0, 8, .check_checksum = false, .frequency = 50U}, \
{0x224, 0, 8, .check_checksum = false, .frequency = 40U}, \
{0x226, 0, 8, .check_checksum = false, .frequency = 40U}}}, \
Expand Down

0 comments on commit 655abf5

Please sign in to comment.