Merge branch 'cslc-hkg-fix' into master-dev-c3

This commit is contained in:
Jason Wen
2024-05-16 22:22:38 -04:00
+2 -2
View File
@@ -284,11 +284,11 @@ class CarController(CarControllerBase):
# send resume at a max freq of 10Hz
if (self.frame - self.last_button_frame) * DT_CTRL > 0.1 * send_freq:
# send 25 messages at a time to increases the likelihood of cruise buttons being accepted
can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25)
can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, self.cruise_button, self.CP)] * 25)
if (self.frame - self.last_button_frame) * DT_CTRL >= 0.15 * send_freq:
self.last_button_frame = self.frame
elif self.frame % 2 == 0:
can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP.carFingerprint)] * 25)
can_sends.extend([hyundaican.create_clu11(self.packer, (self.frame // 2) + 1, CS.clu11, self.cruise_button, self.CP)] * 25)
# Parse lead distance from radarState and display the corresponding distance in the car's cluster
if self.CP.openpilotLongitudinalControl and self.sm.updated['radarState'] and self.frame % 5 == 0: