Skip to content

Commit

Permalink
fix misra
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewb1 committed Jul 20, 2023
1 parent 2ed2d02 commit 062ba7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions board/safety/safety_subaru.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ static int subaru_tx_hook(CANPacket_t *to_send) {

if (subaru_gen2) {
tx = msg_allowed(to_send, SUBARU_GEN2_TX_MSGS, SUBARU_GEN2_TX_MSGS_LEN);
} else if(lkas_alt) {
} else if (lkas_alt) {
tx = msg_allowed(to_send, SUBARU_LKAS_ALT_TX_MSGS, SUBARU_LKAS_ALT_TX_MSGS_LEN);
} else {
tx = msg_allowed(to_send, SUBARU_TX_MSGS, SUBARU_TX_MSGS_LEN);
Expand All @@ -194,9 +194,9 @@ static int subaru_tx_hook(CANPacket_t *to_send) {
int desired_angle = ((GET_BYTES(to_send, 4, 4) >> 8) & 0x3FFFFU);
desired_angle = -1 * to_signed(desired_angle, 17);

int request_angle = GET_BIT(to_send, 12);
bool request_angle = GET_BIT(to_send, 12);

if(desired_angle != 0 || request_angle != 0){
if((desired_angle != 0) || request_angle){
tx = 0;
}
}
Expand Down

0 comments on commit 062ba7f

Please sign in to comment.