Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Update cruise_helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jc01rho authored Nov 19, 2023
1 parent 2c896d3 commit d3e5436
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions selfdrive/controls/lib/cruise_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,12 +671,12 @@ def update_v_cruise_apilot(self, v_cruise_kph, buttonEvents, enabled, metric, co
self.naviSpeedRecoveryProcessOngoing = True

if self.naviSpeedRecoveryProcessOngoing and self.naviSpeed == 0:
if self.frame % 100 == 0:
if self.frame % 50 == 0:
self.naviSpeedRecoveryProcessCounter += 1
speed_diff = self.v_cruise_kph_apply - self.naviSpeedPrev
self.naviSpeed = round(self.naviSpeedPrev + speed_diff * (self.naviSpeedRecoveryProcessCounter/40.0))
self.naviSpeed = round(self.naviSpeedPrev + speed_diff * (self.naviSpeedRecoveryProcessCounter/10.0))

if self.naviSpeedRecoveryProcessCounter > 40 :
if self.naviSpeedRecoveryProcessCounter > 10 :
self.naviSpeedRecoveryProcessOngoing = False
self.naviSpeedRecoveryProcessCounter = 0
self.naviSpeedPrev = 0
Expand Down

0 comments on commit d3e5436

Please sign in to comment.