Skip to content

Commit

Permalink
tesla safety: return -1 to block forward (commaai#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm authored Jan 3, 2019
1 parent 74c0c1b commit c2dfbad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions board/safety/safety_tesla.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static int tesla_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd)
// remove EPB_epasControl
if (addr == 0x214)
{
return false;
return -1;
}

return 2; // Custom EPAS bus
Expand All @@ -269,12 +269,12 @@ static int tesla_fwd_hook(int bus_num, CAN_FIFOMailBox_TypeDef *to_fwd)
// remove GTW_epasControl in forwards
if (addr == 0x101)
{
return false;
return -1;
}

return 0; // Chassis CAN
}
return false;
return -1;
}

const safety_hooks tesla_hooks = {
Expand Down

0 comments on commit c2dfbad

Please sign in to comment.