Fix misra: addr can't be more than 29 bits anyway
@@ -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 & 0xFFFF00FF) != 0x18DA00F1) &&
- ((addr != 0x7DF) && ((addr & 0xFFFFFFF8) != 0x7E0))) {
+ if ((addr != 0x18DB33F1) && ((addr & 0x1FFF00FF) != 0x18DA00F1) &&
+ ((addr != 0x7DF) && ((addr & 0x1FFFFFF8) != 0x7E0))) {
tx = 0;
}
return tx;
