Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-desroches committed Oct 3, 2024
1 parent 8de1323 commit 3c98cda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions board/safety/safety_chrysler.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ static void chrysler_rx_hook(const CANPacket_t *to_push) {
vehicle_moving = (GET_BYTE(to_push, 4) != 0U) || (GET_BYTE(to_push, 5) != 0U);
}
if ((chrysler_platform == CHRYSLER_PACIFICA) && (bus == 0) && (addr == 514)) {
bool speed_l = ((GET_BYTE(to_push, 0) << 4) != 0U) || ((GET_BYTE(to_push, 1) >> 4) != 0U);
bool speed_r = ((GET_BYTE(to_push, 2) << 4) != 0U) || ((GET_BYTE(to_push, 3) >> 4) != 0U);
vehicle_moving = speed_l || speed_r;
bool speed_l_non_zero = ((GET_BYTE(to_push, 0) << 4) != 0U) || ((GET_BYTE(to_push, 1) >> 4) != 0U);
bool speed_r_non_zero = ((GET_BYTE(to_push, 2) << 4) != 0U) || ((GET_BYTE(to_push, 3) >> 4) != 0U);
vehicle_moving = speed_l_non_zero || speed_r_non_zero;
}

// exit controls on rising edge of gas press
Expand Down

0 comments on commit 3c98cda

Please sign in to comment.