From 062ba7fad454add5b9bfccb15d165c6e754c7160 Mon Sep 17 00:00:00 2001 From: Justin Newberry Date: Thu, 20 Jul 2023 04:20:18 +0000 Subject: [PATCH] fix misra --- board/safety/safety_subaru.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/board/safety/safety_subaru.h b/board/safety/safety_subaru.h index 18ef38fe75..6c2e5489be 100644 --- a/board/safety/safety_subaru.h +++ b/board/safety/safety_subaru.h @@ -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); @@ -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; } }