commaai / commaai/opendbc

VW MQB: alpha longitudinal doesn't support cancel from main switch

Open
#1,160 0 comments 0 reactions 0 assignees View on GitHub
bug car volkswagen
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.

![Screenshot from 2023-07-01 11-54-03](https://github.com/commaai/openpilot/assets/46612682/6fece209-7a9a-47af-8a35-edf9cab62dfa)

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.

![Screenshot from 2023-07-01 12-01-48](https://github.com/commaai/openpilot/assets/46612682/a12b8f48-d9a5-4d2d-a0c8-26d067bc1c47)

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).

![Screenshot from 2023-07-01 11-58-22](https://github.com/commaai/openpilot/assets/46612682/02fee3d4-43e8-4c27-9780-45b82c5f17e3)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.