Fix Zwift Click V2 held shifting to respect gears_volume_debouncing - #4909
Merged
Merged
Conversation
Owner
Author
|
Mail from ssssgibbs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
0x23) was handled as edge-only regardless of the usergears_volume_debouncingsetting, so holding a button produced only a single gear change instead of repeating when debouncing was disabled.gears_volume_debouncingis true emit one event per press edge, and when false allow each incoming V2 notification that still reports the button pressed to generate another gear change.Description
gears_volume_debouncingboolean inprocessRideControllerNotificationcall and signature, and propagated it to subfunctions insrc/zwift_play/abstractZapDevice.h.processRideShiftGearto emit gear actions under the conditionstate.X && (!gears_volume_debouncing || !previousX)for all Ride gear buttons so that:gears_volume_debouncing == truekeeps edge-only behavior, andgears_volume_debouncing == falseallows repeated events while the button remains pressed.processRideAnalogStateso paddle gear actions follow thegears_volume_debouncingsetting while leaving normal paddle position signals unchanged.0x37), preservedzwiftplay_swapsemantics, button mappings,emitRidePaddleGeartiming rules, and auto-repeat timer logic; no new artificial repeat timers were added.src/zwift_play/abstractZapDevice.h(behavioral changes and signature updates) andtst/Devices/TestZwiftRideController.cpp(new/extended unit tests exercising held-button and paddle behaviors andzwiftplay_swap).Testing
tst/Devices/TestZwiftRideController.cppto validate held-shift behavior withgears_volume_debouncingboth true and false, verify swapped directions viazwiftplay_swap, and ensure left/right paddles only repeat gear actions when debouncing is disabled.qmake/makethen run theqdomyos-zwift-teststest binary) and are expected to verify the changes.emitRidePaddleGeartiming logic was left intact to avoid double-repeat interactions; unit tests focus on the Ride/Click V2 semantics described above.Codex Task