|
|
@ -331,8 +331,8 @@ class SelfdriveD: |
|
|
|
desired_lateral_accel = controlstate.desiredCurvature * (clipped_speed**2) |
|
|
|
desired_lateral_accel = controlstate.desiredCurvature * (clipped_speed**2) |
|
|
|
undershooting = abs(desired_lateral_accel) / abs(1e-3 + actual_lateral_accel) > 1.2 |
|
|
|
undershooting = abs(desired_lateral_accel) / abs(1e-3 + actual_lateral_accel) > 1.2 |
|
|
|
turning = abs(desired_lateral_accel) > 1.0 |
|
|
|
turning = abs(desired_lateral_accel) > 1.0 |
|
|
|
good_speed = CS.vEgo > 5 |
|
|
|
# TODO: lac.saturated includes speed and other checks, should be pulled out |
|
|
|
if undershooting and turning and good_speed and lac.saturated: |
|
|
|
if undershooting and turning and lac.saturated: |
|
|
|
self.events.add(EventName.steerSaturated) |
|
|
|
self.events.add(EventName.steerSaturated) |
|
|
|
|
|
|
|
|
|
|
|
# Check for FCW |
|
|
|
# Check for FCW |
|
|
|