From e3539edc313551bca4f04a6779c12f6035010dfc Mon Sep 17 00:00:00 2001 From: sshane Date: Sat, 15 Oct 2022 01:49:32 -0700 Subject: [PATCH] adjust safety --- board/safety/safety_hyundai_canfd.h | 6 +++--- tests/safety/test_hyundai_canfd.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/board/safety/safety_hyundai_canfd.h b/board/safety/safety_hyundai_canfd.h index baff625ed5..6b6ff5128d 100644 --- a/board/safety/safety_hyundai_canfd.h +++ b/board/safety/safety_hyundai_canfd.h @@ -12,9 +12,9 @@ const SteeringLimits HYUNDAI_CANFD_STEERING_LIMITS = { // the EPS faults when the steering angle is above a certain threshold for too long. to prevent this, // we allow setting torque actuation bit to 0 while maintaining the requested torque value for two consecutive frames - .min_valid_request_frames = 89, - .max_invalid_request_frames = 2, - .min_valid_request_rt_interval = 810000, // 810ms; a ~10% buffer on cutting every 90 frames + .min_valid_request_frames = 33, + .max_invalid_request_frames = 1, + .min_valid_request_rt_interval = 306000, // 810ms; a ~10% buffer on cutting every 90 frames .has_steer_req_tolerance = true, }; diff --git a/tests/safety/test_hyundai_canfd.py b/tests/safety/test_hyundai_canfd.py index cb3b35f1d9..4ecb795bf0 100755 --- a/tests/safety/test_hyundai_canfd.py +++ b/tests/safety/test_hyundai_canfd.py @@ -26,9 +26,9 @@ class TestHyundaiCanfdBase(HyundaiButtonBase, common.PandaSafetyTest, common.Dri DRIVER_TORQUE_FACTOR = 2 # Safety around steering req bit - MIN_VALID_STEERING_FRAMES = 89 - MAX_INVALID_STEERING_FRAMES = 2 - MIN_VALID_STEERING_RT_INTERVAL = 810000 # a ~10% buffer, can send steer up to 110Hz + MIN_VALID_STEERING_FRAMES = 33 + MAX_INVALID_STEERING_FRAMES = 1 + MIN_VALID_STEERING_RT_INTERVAL = 306000 # a ~10% buffer, can send steer up to 110Hz PT_BUS = 0 STEER_BUS = 0