VW MQB: alpha longitudinal doesn't support cancel from main switch
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 2.3k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 38
Description
### Describe the bug
A subset of Volkswagen family vehicles have no standalone cancel button, instead overloading this function onto the momentary-contact main switch button. openpilot operates as-expected on all these vehicles when using stock ACC, including cancel spam to disengage on gas. However, it doesn't currently implement cancel functionality for these cars under alpha longitudinal, so brake (or gas, if enabled) is the only normal way to disengage.
- [ ] Cleanup and align `GRA_ACC_01` in vw_mqb_2010.dbc with current data sources
- [ ] Panda checksum, counter, and rate enforcement for `GRA_ACC_01` now that receiving it is safety-relevant
- [ ] Sense main switch type (momentary contact vs latching) from `GRA_ACC_01.GRA_Typ_Hauptschalter`
- [ ] If type is momentary contact, cancel on rising edge of `GRA_ACC_01.GRA_Hauptschalter`
### Provide a route where the issue occurs
bbc2fa573509b5ff|2023-07-02--00-06-58
### openpilot version
master
### Additional info
In North America, Volkswagen family vehicles with steering wheel buttons MY2018 and older, there is a dedicated Cancel button. There is a separate button to invoke the ADAS features menu at the tip of the turn signal stalk.

For vehicles MY2019 and newer, the ADAS features menu button at the tip of the turn stalk goes away, and moves to where the Cancel button was. Cancel functionality is overloaded onto the momentary-contact main switch button, directly above.

Vehicles outside of North America may be missing the Cancel button as well, in favor of a mode-switch button that toggles between a speed limiter mode and actual cruise control (standard or adaptive as-equipped).

Contributor guide
No contributing guide indexed for this repository
Research direction
Start with `vw_mqb_2010.dbc` and the `GRA_ACC_01` signals named in the checklist, then trace the related Panda safety handling. Confirm the checksum, counter, and rate rules against current data sources, and determine how the main-switch type and rising edge should be represented. Done means momentary-contact switches can cancel under alpha longitudinal without regressing other Volkswagen configurations.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100