From 2e6f7748563447c499c7e4a3dfa94e7ee45b7166 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Wed, 11 Apr 2018 14:45:52 -0700 Subject: [PATCH] block IPAS in main toyota safety mode --- board/safety/safety_toyota.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/safety/safety_toyota.h b/board/safety/safety_toyota.h index 3fa3b95950157f..955931166e6959 100644 --- a/board/safety/safety_toyota.h +++ b/board/safety/safety_toyota.h @@ -82,6 +82,10 @@ static int toyota_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) { // Check if msg is sent on BUS 0 if (((to_send->RDTR >> 4) & 0xF) == 0) { + // no IPAS in non IPAS mode + if ((to_send->RIR>>21) == 0x266) return false; + if ((to_send->RIR>>21) == 0x167) return false; + // ACCEL: safety check on byte 1-2 if ((to_send->RIR>>21) == 0x343) { int16_t desired_accel = ((to_send->RDLR & 0xFF) << 8) | ((to_send->RDLR >> 8) & 0xFF);