VW: allow adjusting set speed when disabled#36758
VW: allow adjusting set speed when disabled#36758RJWadley wants to merge 8 commits intocommaai:masterfrom
Conversation
There was a problem hiding this comment.
Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:
- Convert your PR to a draft unless it's ready to review
- Read the contributing docs
- Before marking as "ready for review", ensure:
- the goal is clearly stated in the description
- all the tests are passing
- the change is something we merge
- include a route or your device' dongle ID if relevant
|
This PR has had no activity for 24 days. It will be automatically closed in 7 days if there is no activity. |
|
One side effect on non-VW non-PCM brands worth considering: Their base GM is worse, it enables on the rising edge of Since the feature is really "this car has independent set-speed buttons," I'd scope it to VW explicitly and keep the old guard intact for everyone else: if not enabled and self.CP.brand != 'volkswagen':
return
# ...
if not self.button_change_states[button_type]["enabled"] and self.CP.brand != 'volkswagen':
returnBrand checks are already standard in this area ( On testing: this PR needs tests. I took a stab at coverage for the adjust-while-disabled paths on https://github.com/andiradulescu/openpilot/commits/set-speed/ - feel free to cherry-pick, fold in, or ignore. That branch also carries a latent precedence bug fix in |
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
|
thanks for the feedback @andiradulescu! I hadn't considered how openpilot would behave while disabled during a button hold. I cooked up some tests to cover some of the missing cases and this branch does indeed fail in exactly the scenarios you've described! master as-is passes. In the short term, a branch check is probably the simplest fix. I'd rather keep it generic but it's not possible with openpilot's button handling at the moment. |
goal: more closely align with stock ACC behavior on VW cars with independent speed buttons
some cars have +/- buttons that are separate. realistically for openpilot this just means VW, since most other affected cars use flexray, but it's not inherently a VW thing. KIA EV9 has independent buttons for example, but it still treats them as SET+ and SET- so they're not affected here.
Since it has independent buttons, VW's stock system allows adjustment of the set point while disabled. In most cars, the +/- buttons are shared with RES/SET and this is inherently not possible.
tweaks:
Sample route showing adjustment while disabled:
a3d353f2254caee4/00000242--cb0f881531/0