hyundai: increase number of resume messages sent at a time (#19634)

* make hyundai resume reliable

* typo

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 97bfd91955
commatwo_master
Greg Hogan 4 years ago committed by GitHub
parent 6449aa05ac
commit a342b68304
  1. 3
      selfdrive/car/hyundai/carcontroller.py

@ -76,7 +76,8 @@ class CarController():
elif CS.out.cruiseState.standstill: elif CS.out.cruiseState.standstill:
# send resume at a max freq of 10Hz # send resume at a max freq of 10Hz
if (frame - self.last_resume_frame)*DT_CTRL > 0.1: if (frame - self.last_resume_frame)*DT_CTRL > 0.1:
can_sends.extend([create_clu11(self.packer, frame, CS.clu11, Buttons.RES_ACCEL)] * 20) # send 25 messages at a time to increases the likelihood of resume being accepted
can_sends.extend([create_clu11(self.packer, frame, CS.clu11, Buttons.RES_ACCEL)] * 25)
self.last_resume_frame = frame self.last_resume_frame = frame
# 20 Hz LFA MFA message # 20 Hz LFA MFA message

Loading…
Cancel
Save