File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ def update_events(self, CS):
300
300
self .events .add (EventName .commIssue )
301
301
elif not self .sm .all_freq_ok ():
302
302
self .events .add (EventName .commIssueAvgFreq )
303
- else : # invalid or can_rcv_error.
303
+ else : # invalid or can_rcv_error.
304
304
self .events .add (EventName .commIssue )
305
305
306
306
if not self .logged_comm_issue :
@@ -588,7 +588,14 @@ def state_control(self, CS):
588
588
lac_log .saturated = abs (actuators .steer ) >= 0.9
589
589
590
590
# Send a "steering required alert" if saturation count has reached the limit
591
- if lac_log .active and lac_log .saturated and not CS .steeringPressed :
591
+ if lac_log .active and not CS .steeringPressed and self .CP .lateralTuning .which () == 'torque' :
592
+ undershooting = abs (lac_log .desiredLateralAccel ) / abs (1e-3 + lac_log .actualLateralAccel ) > 1.2
593
+ turning = abs (lac_log .desiredLateralAccel ) > 1.0
594
+ good_speed = CS .vEgo > 5
595
+ max_torque = abs (self .last_actuators .steer ) > 0.99
596
+ if undershooting and turning and good_speed and max_torque :
597
+ self .events .add (EventName .steerSaturated )
598
+ elif lac_log .active and lac_log .saturated and not CS .steeringPressed :
592
599
dpath_points = lat_plan .dPathPoints
593
600
if len (dpath_points ):
594
601
# Check if we deviated from the path
You can’t perform that action at this time.
0 commit comments