Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interfaces: Stock Longitudinal: Prevent disengagement on release of cancel button #34022

Closed

Conversation

sunnyhaibin
Copy link
Contributor

@sunnyhaibin sunnyhaibin commented Nov 14, 2024

Description

  • Currently, we are unable to use the PAUSE/RESUME button to re-engage openpilot due to a breaking change introduced in Hyundai: always publish cruise and main buttons opendbc#1326, which affects Hyundai/Kia/Genesis models using stock longitudinal control
  • For some newer model years of Hyundai/Kia/Genesis cars using stock longitudinal control, the CANCEL button acts as a PAUSE/RESUME based on PCM state.
  • Button events for Hyundai are now published continuously, leading to unintended disengagement on CANCEL button release.

Change

  • For stock longitudinal control, the buttonCancel event now only triggers on the rising edge (button press) of the CANCEL button.
  • openpilot longitudinal control continues to trigger buttonCancel on both press and release.

Verification

  1. Disable openpilot longitudinal control, then start the car.
  2. Engage openpilot by pressing the CRUISE MAIN button.
  3. Cancel openpilot by pressing then releasing the PAUSE/RESUME button.
  4. Resume openpilot by pressing then releasing the PAUSE/RESUME button.
  5. Verify step 4 that openpilot stays engaged after the PAUSE/RESUME button is released.

Route

Route: 2bbe12792a30f61f/0000048c--f94b4ede96

@github-actions github-actions bot added the car vehicle-specific label Nov 14, 2024
@jyoung8607
Copy link
Collaborator

Since it traces back to #1326, I've requested review from @sshane.

I don't take a position on whether this PR is a correct fix.

@sshane
Copy link
Contributor

sshane commented Nov 14, 2024

Reverting the original PR as I'm not sure of the implications of not canceling on cancel press for other brands when stock long. There wasn't a real reason for it, it was only to log more data, which is still desired.

@sshane sshane closed this Nov 14, 2024
@sshane
Copy link
Contributor

sshane commented Nov 14, 2024

A proper fix would be to support the pause/resume button for openpilot longitudinal, do we have a PR for that somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car vehicle-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants