mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-23 20:52:06 +08:00
Merge branch 'hkg-can-jerk' into lt
This commit is contained in:
@@ -834,8 +834,8 @@ class Controls:
|
||||
self.prev_overtaking_accel_engaged = self.overtaking_accel_engaged
|
||||
ttc = self.sm['radarState'].leadOne.dRel / CS.vEgo if CS.vEgo > 0 else 255
|
||||
overtaking_accel_engaged = self.overtaking_accel and overtaking_accel_allowed and \
|
||||
CS.vEgo > (60 * CV.KPH_TO_MS) if self.is_metric else (40 * CV.MPH_TO_MS) and long_plan.hasLead and \
|
||||
long_plan.aTarget > -0.2 and not (CS.leftBlinker and CS.rightBlinker) and ttc > 0.75
|
||||
(CS.vEgo > ((60 * CV.KPH_TO_MS) if self.is_metric else (40 * CV.MPH_TO_MS))) and long_plan.hasLead and \
|
||||
long_plan.aTarget > -0.2 and not (CS.leftBlinker and CS.rightBlinker) and (0.75 < ttc < 3.0)
|
||||
if ttc <= 0.75 and self.prev_overtaking_accel_engaged and overtaking_accel_engaged:
|
||||
overtaking_accel_engaged = False
|
||||
if overtaking_accel_engaged and not self.prev_overtaking_accel_engaged:
|
||||
|
||||
Reference in New Issue
Block a user