Skip to content

Commit

Permalink
Cadillac: need to specify car name in const
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Jun 1, 2018
1 parent 79ab5af commit 9d92bf2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions board/safety/safety_cadillac.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const int STEER_MAX = 150; // 1s
const int CADILLAC_STEER_MAX = 150; // 1s
const int CADILLAC_IGNITION_TIMEOUT = 1000000; // 1s

int cadillac_ign = 0;
Expand Down Expand Up @@ -36,7 +36,8 @@ static int cadillac_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
lkas_cmd = to_signed(lkas_cmd, 14);
// block message is controls are allowed and lkas command exceeds max, or
// if controls aren't allowed and lkas cmd isn't 0
if (controls_allowed && ((lkas_cmd > STEER_MAX) || (lkas_cmd < -STEER_MAX))) {
if (controls_allowed &&
((lkas_cmd > CADILLAC_STEER_MAX) || (lkas_cmd < -CADILLAC_STEER_MAX))) {
return 0;
} else if (!controls_allowed && lkas_cmd) return 0;
}
Expand Down

0 comments on commit 9d92bf2

Please sign in to comment.