diff --git a/board/safety/safety_elm327.h b/board/safety/safety_elm327.h index ce405b47675f11..e5ac049500b6dc 100644 --- a/board/safety/safety_elm327.h +++ b/board/safety/safety_elm327.h @@ -11,8 +11,8 @@ static int elm327_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) { //Check valid 29 bit send addresses for ISO 15765-4 //Check valid 11 bit send addresses for ISO 15765-4 - if ((addr != 0x18DB33F1) && ((addr & 0x1FFF00FF) != 0x18DA00F1) && - ((addr != 0x7DF) && ((addr & 0x7F8) != 0x7E0))) { + if ((addr != 0x18DB33F1) && ((addr & 0xFFFF00FF) != 0x18DA00F1) && + ((addr != 0x7DF) && ((addr & 0xFFFFFFF8) != 0x7E0))) { tx = 0; } return tx;