only spam resume when future is > vEgoStarting

pull/24873/head
Shane Smiskol 3 years ago
parent 5f32cd1fcb
commit 3dc51f663d
  1. 2
      selfdrive/car/honda/carcontroller.py
  2. 2
      selfdrive/controls/controlsd.py

@ -195,7 +195,7 @@ class CarController:
# If using stock ACC, spam cancel command to kill gas when OP disengages.
if pcm_cancel_cmd:
can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.CANCEL, idx, self.CP.carFingerprint))
elif CS.out.cruiseState.standstill:
elif CC.cruiseControl.override: # TODO: add an ordinal or rename override
can_sends.append(hondacan.spam_buttons_command(self.packer, CruiseButtons.RES_ACCEL, idx, self.CP.carFingerprint))
else:

@ -646,6 +646,8 @@ class Controls:
CC.cruiseControl.cancel = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise)
if self.joystick_mode and self.sm.rcv_frame['testJoystick'] > 0 and self.sm['testJoystick'].buttons[0]:
CC.cruiseControl.cancel = True
if len(speeds := self.sm['longitudinalPlan'].speeds) > 1:
CC.cruiseControl.override = CS.cruiseState.standstill and speeds[-1] > self.CP.vEgoStarting
hudControl = CC.hudControl
hudControl.setSpeed = float(self.v_cruise_kph * CV.KPH_TO_MS)

Loading…
Cancel
Save