Skip to content

Conversation

@elkoled
Copy link
Owner

@elkoled elkoled commented Feb 2, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants