fix(vader5): restore back-paddle evdev codes to BTN_TRIGGER_HAPPY5-8 (real Elite 2 layout)#389
Conversation
…(real Elite 2 layout) PR #353 moved the Vader 5 back paddles M1-M4 from BTN_TRIGGER_HAPPY5-8 to HAPPY1-4 on the unverified assumption that "Steam Elite paddle slots = HAPPY1-4". That hardware check only confirmed via evtest that the codes were emitted, not that Steam recognized them as paddles. On a real Vader 5 + Steam this regressed paddle recognition: Steam stopped reading the back paddles entirely. The real Xbox Elite Series 2 (which the Vader 5 masquerades as, 045e:0b00) exposes its four back paddles P1-P4 as BTN_TRIGGER_HAPPY5-8 on Linux (xpad driver, PR #195); SDL's hidapi Xbox driver reads paddle state from that layout. Restoring M1-M4 to HAPPY5-8 was hardware-confirmed to make Steam's P1-P4 paddles respond again. This reverts only the paddle codes. The M2/M3 swap (PR #323, Steam Elite P3/P2 order) is preserved, and the non-paddle extras C/Z/LM/RM/O stay at HAPPY9-13 where PR #353 correctly moved them out of the paddle range (avoids the #235 collision). Final layout: paddles M1-M4 = HAPPY5-8, extras = HAPPY9-13, no collision. Tests: - validate_e2e_test.zig: positive lock now asserts M1-M4 = HAPPY5/7/6/8; structural-invariant asserts paddle range HAPPY5-8 and C/Z/LM/RM/O not in it. - uhid_descriptor.zig: Vader 5 descriptor test re-derives expected HID usages (HAPPY5-8 -> 21/23/22/24) and asserts M1-M4 = HAPPY5/7/6/8. - Docker test suite passes; falsifiability verified (M1=HAPPY1 fails both locks).
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Flydigi Vader 5 controller's M1–M4 extra button mappings are remapped from trigger-happy slots 1–4 to slots 5, 7, 6, and 8 respectively. The device configuration, unit test descriptors, and E2E regression tests are all updated consistently to validate the new mapping. ChangesVader 5 M1–M4 Button Remapping
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Regression
PR #353 (b42abd2) moved the Vader 5 back paddles M1-M4 from
BTN_TRIGGER_HAPPY5-8toHAPPY1-4on the unverified assumption that "Steam Elite paddle slots = HAPPY1-4". Its hardware check only confirmed (viaevtest) that the evdev codes were emitted, not that Steam recognized them as paddles. On a real Vader 5 + Steam this regressed paddle recognition — Steam stopped reading the back paddles.Fix (hardware-confirmed)
The Vader 5 masquerades as an Xbox Elite Series 2 (
045e:0b00). The real Elite 2 exposes its four back paddles P1-P4 asBTN_TRIGGER_HAPPY5-8on Linux (xpad driver, PR #195); SDL's hidapi Xbox driver reads paddle state from that layout. Restoring M1-M4 to HAPPY5-8 was verified on a real Vader 5 + Steam to make paddles P1-P4 respond again.Final
[output.buttons]layout:No collision: paddles occupy 5-8, extras occupy 9-13.
Evidence
BTN_TRIGGER_HAPPY5-8Changes
devices/flydigi/vader5.toml: M1-M4 -> HAPPY5/7/6/8; comment cites real-hardware basis.src/test/validate_e2e_test.zig: positive lock asserts M1-M4 = HAPPY5/7/6/8; structural-invariant asserts paddle range HAPPY5-8 and C/Z/LM/RM/O not in it.src/io/uhid_descriptor.zig: Vader 5 descriptor test re-derives expected HID usages (HAPPY5-8 -> 21/23/22/24) and asserts M1-M4 = HAPPY5/7/6/8.Test plan
./scripts/padctl-docker test-> EXIT=0.validate_e2epositive lock +uhid_descriptorVader 5 order); restored after.zig fmt --check(0.15.2) clean on changed.zigfiles.Summary by CodeRabbit
Bug Fixes
Tests