Skip to content

Commit

Permalink
insignificant changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rbiasini committed Nov 15, 2019
1 parent f239b99 commit a86418c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions board/safety/safety_chrysler.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,14 @@ static void chrysler_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) {

static int chrysler_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {

int addr = GET_ADDR(to_send);
int tx = 1;

// If camera is on bus 0, then nothing can be sent
if (chrysler_camera_detected) {
tx = 0;
}

int addr = GET_ADDR(to_send);

// LKA STEER
if (addr == 0x292) {
int desired_torque = ((GET_BYTE(to_send, 0) & 0x7U) << 8) + GET_BYTE(to_send, 1) - 1024U;
Expand Down Expand Up @@ -103,7 +102,7 @@ static int chrysler_tx_hook(CAN_FIFOMailBox_TypeDef *to_send) {
// FORCE CANCEL: safety check only relevant when spamming the cancel button.
// ensuring that only the cancel button press is sent when controls are off.
// This avoids unintended engagements while still allowing resume spam
// TODO: fix bug preventing the button msg to be fwd'd on bus 2
// TODO!

// 1 allows the message through
return tx;
Expand Down

0 comments on commit a86418c

Please sign in to comment.