From f161ca6be105e1316221b9a6140de9692c7a67f5 Mon Sep 17 00:00:00 2001 From: neokii Date: Thu, 8 Sep 2022 21:51:45 +0900 Subject: [PATCH] fix safety check --- panda/board/safety/safety_hyundai_community.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/board/safety/safety_hyundai_community.h b/panda/board/safety/safety_hyundai_community.h index f14c5d18d315d7..85d40ad38cdbef 100644 --- a/panda/board/safety/safety_hyundai_community.h +++ b/panda/board/safety/safety_hyundai_community.h @@ -200,9 +200,9 @@ static int hyundai_community_tx_hook(CANPacket_t *to_send, bool longitudinal_all if (addr == 832) { LKAS11_op = 20; int desired_torque = ((GET_BYTES_04(to_send) >> 16) & 0x7ff) - 1024; - //bool steer_req = GET_BIT(to_send, 27U) != 0U; + bool steer_req = GET_BIT(to_send, 27U) != 0U; - if (steer_torque_cmd_checks(desired_torque, 1, HYUNDAI_STEERING_LIMITS)) { + if (steer_torque_cmd_checks(desired_torque, steer_req, HYUNDAI_STEERING_LIMITS)) { tx = 0; } }