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>
old-commit-hash: 90ce7605c1
beeps
Jason Wen 2 years ago committed by GitHub
parent 701bde9de3
commit 855961f552
  1. 1
      selfdrive/car/hyundai/carcontroller.py

@ -169,6 +169,7 @@ 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)
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:

Loading…
Cancel
Save