Skip to content

Commit

Permalink
adjust safety
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Oct 15, 2022
1 parent e0b18df commit e3539ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions board/safety/safety_hyundai_canfd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
6 changes: 3 additions & 3 deletions tests/safety/test_hyundai_canfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e3539ed

Please sign in to comment.