body: set controls allowed
@@ -8,6 +8,8 @@ static int body_rx_hook(CANPacket_t *to_push) {
bool valid = addr_safety_check(to_push, &body_rx_checks, NULL, NULL, NULL);
+ controls_allowed = valid;
+
return valid;
}
@@ -22,7 +24,7 @@ static int body_tx_hook(CANPacket_t *to_send, bool longitudinal_allowed) {
tx = 1;
}
- if (addr == 0x250) {
+ if ((addr == 0x250) && controls_allowed) {
tx = 1;
}
