Skip to content

Commit

Permalink
Fix misra: addr can't be more than 29 bits anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Nov 18, 2019
1 parent 68ff501 commit 57f5ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions board/safety/safety_elm327.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 57f5ef8

Please sign in to comment.