Skip to content

Commit 9d92bf2

Browse files
committed
Cadillac: need to specify car name in const
1 parent 79ab5af commit 9d92bf2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

board/safety/safety_cadillac.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const int STEER_MAX = 150; // 1s
1+
const int CADILLAC_STEER_MAX = 150; // 1s
22
const int CADILLAC_IGNITION_TIMEOUT = 1000000; // 1s
33

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

0 commit comments

Comments
 (0)