Skip to content

Conversation

@RJWadley
Copy link

goal: working distance buttons regardless of car-specific inconsistencies

VW's distance buttons generally have three possible values.

  • a value of 1 is in theory distance -1
  • a value of 2 is in theory distance +1
  • a value of 3 is in theory distance toggle

the actual behavior varies. I know that some PQ cars send a value of 1 when distance is pressed depending on equipment. Many cars will send a value of 3, but never use 1 or 2 even when manually adjusting distance. Presumably these inconsistencies could surface across the entire VW lineup.

Since openpilot doesn't really care about distance +1 vs -1 vs toggle, I find the cleanest fix here is to simply check the truthiness of the signal, rather than a specific value.

a side note: why include 2? I've included 2 here for consistency. If a vehicle actually did use values 1 and 2, I don't want DIST+ and DIST- to be treated differently

@github-actions github-actions bot added car related to opendbc/car/ volkswagen labels Jan 27, 2026
@github-actions
Copy link
Contributor

Testing 130 segments for: VOLKSWAGEN_ARTEON_MK1, VOLKSWAGEN_ATLAS_MK1, VOLKSWAGEN_CRAFTER_MK2, VOLKSWAGEN_GOLF_MK7, VOLKSWAGEN_JETTA_MK7, VOLKSWAGEN_PASSAT_MK8, VOLKSWAGEN_PASSAT_NMS, VOLKSWAGEN_POLO_MK6, VOLKSWAGEN_TAOS_MK1, VOLKSWAGEN_TIGUAN_MK2, VOLKSWAGEN_TOURAN_MK2, VOLKSWAGEN_TRANSPORTER_T61, VOLKSWAGEN_TROC_MK1

Results: 127 passed, 3 with diffs, 0 errors


VOLKSWAGEN_ATLAS_MK1 - dd164eeda7f46755/2025-05-31--16-02-58/10
  buttonEvents (8 diffs)
    frame 5155: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5173: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5182: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5194: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5209: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5215: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5302: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5317: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]

VOLKSWAGEN_ATLAS_MK1 - dd164eeda7f46755/2025-06-21--11-33-22/23
  buttonEvents (8 diffs)
    frame 5657: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5669: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5678: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5690: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5696: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5705: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]
    frame 5717: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 5726: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]

VOLKSWAGEN_GOLF_MK7 - dd3a758c42a0eb3c/00000021--da0a4932bd/5
  buttonEvents (2 diffs)
    frame 961: [] -> [{'pressed': True, 'type': 'gapAdjustCruise'}]
    frame 973: [] -> [{'pressed': False, 'type': 'gapAdjustCruise'}]

@RJWadley
Copy link
Author

I don't have access to the routes above, but the diffs look as expected to me.

In the VOLKSWAGEN_ATLAS_MK1 routes, the driver likely pressed the distance button four times in a row to adjust the following distance to the minimum.

In the VOLKSWAGEN_GOLF_MK7 route, the driver likely either pressed the distance button but did not adjust it OR pressed the distance button and adjusted distance using the +/- buttons (these are sent as ACCEL+ and ACCEL- instead of reusing the distance button signal)

@sshane sshane requested a review from jyoung8607 January 27, 2026 05:01
@sshane sshane modified the milestones: Spring Cleaning, In progress Jan 27, 2026
@jyoung8607 jyoung8607 self-assigned this Jan 27, 2026
Copy link
Collaborator

@jyoung8607 jyoung8607 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right that there's different behavior from different styles of button/stalk controls. This is probably a step in the correct direction, but I'll have to review logs from my cars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

car related to opendbc/car/ volkswagen

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants