Hyundai: 2015-16 Genesis resume from standstill fix (#25579)

* Hyundai: 2015-16 Genesis resume from standstill fix

* Add comment

* Fix typo

* Merge both methods

* Add back the comment

* 20Hz not needed according to tester

* no new global state variable

* PCM's perspective: random counter -> random counter

* only send 5

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
inactive-accel-fix
Jason Wen 2 years ago committed by GitHub
parent b76795d7f0
commit 90ce7605c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/car/hyundai/carcontroller.py

@ -169,7 +169,8 @@ class CarController:
if (self.frame - self.last_button_frame) * DT_CTRL > 0.1:
# send 25 messages at a time to increases the likelihood of resume being accepted
can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.RES_ACCEL, self.CP.carFingerprint)] * 25)
self.last_button_frame = self.frame
if (self.frame - self.last_button_frame) * DT_CTRL >= 0.15:
self.last_button_frame = self.frame
if self.frame % 2 == 0 and self.CP.openpilotLongitudinalControl:
# TODO: unclear if this is needed

Loading…
Cancel
Save