Skip to content

Commit

Permalink
Add ACC_CONTROL_3 message
Browse files Browse the repository at this point in the history
  • Loading branch information
PenitentTangent2401 committed Dec 31, 2024
1 parent 92beac6 commit 9743221
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- secoc_long
pull_request:

concurrency:
Expand Down
8 changes: 8 additions & 0 deletions board/safety/safety_toyota.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
TOYOTA_BASE_TX_MSGS \
{0x2E4, 0, 8}, {0x131, 0, 8}, /* STEERING_LKA (longer message for SecOC), STEERING_LTA_2 */ \
{0x183, 0, 8}, {0x411, 0, 8}, /* ACC_CONTROL_2, PCS_HUD */ \
{0x24D, 0, 8}, /* ACC_CONTROL_3 */ \
{0x750, 0, 8}, /* radar diagnostic address */ \

#define TOYOTA_COMMON_LONG_TX_MSGS \
Expand Down Expand Up @@ -230,6 +231,13 @@ static bool toyota_tx_hook(const CANPacket_t *to_send) {
tx = false;
}
}
if (addr == 0x24D) {
bool violation = !toyota_secoc; // Only SecOC cars may transmit this message

if (violation) {
tx = false;
}
}

// AEB: block all actuation. only used when DSU is unplugged
if (addr == 0x283) {
Expand Down

0 comments on commit 9743221

Please sign in to comment.