Repository navigation
feat(gui): add support for standalone RS Handbrake and Logitech Racing Adapter - #139
Conversation
93957b4 to
85b9b9a
Compare
934133f to
e88f82a
Compare
mescon
left a comment
There was a problem hiding this comment.
Now that #140 is in, this is down to one commit (e88f82a) and merges cleanly. Code looks good; the blockers are in the doc and one code/doc mismatch:
- "Pedals Connected to Wheel Base" table contradicts the hardware-verified mapping the Test page itself uses (
pedal_axesin evtest.rs, proven per axis in the driver comment aboveHIDPP_DD_PEDAL_BASE_AXIS): RS50/G PRO throttleABS_RX, brakeABS_RY, clutchABS_RZ, handbrakeABS_Z. The G923 editions differ again. Please drop the table or copy those rows. - DB9 Reverse: the doc says
0x127,gear_from_adapter_codesays0x126and the test asserts0x127is nothing. Which did evtest show on your adapter? Fix the other one. 0x124isBTN_TOP2and0x125isBTN_PINKIE, notBTN_BASE5/6.- The Shift Up/Down badges follow the paddle codes on every wheel, so they flash on a bare RS50 under a "Shifter & Handbrake" heading. Gate the row on a handbrake-detected flag (you have it from
open_standalone_handbrake) or label it as paddles. - One label per source: "Logitech Racing Adapter" at start becomes "Racing Adapter (Driving Force)" after the first gear.
2fada03 to
eae783f
Compare
|
Thanks for the thorough review @mescon! I've updated the PR and verified all combinations on live hardware (RS50 Base
|
mescon
left a comment
There was a problem hiding this comment.
Doc fixes and the badge gating check out against the source. The kernel probe is new in this revision, so two points there, then three small ones:
- Adapter detection =
Root.getFeature(0x8120)on a candidate sub-device. 0x8120 is a base feature (root index 0x0F on both wheels), and the candidate order probes the base's own0x01and0x05before0x04; their catalogs were never enumerated. If either answers, every bare base reportsRacing Adapterand gets the desktop routing sequence, and a real adapter at 0x04 is never looked for. Please paste the dmesg pairRacing Adapter at dev 0x0N/Racing Adapter removedfrom your unplug test, plus a pedals-only boot with noRacing Adapterline. If 0x01 or 0x05 answers, confirm by the0x0005name as the S&H does (hidpp_dd_query_accessory_name). wheel_accessorycan printRacing Adapter, Racing Adapter: the S&H name query can leaveaccessory_nameempty, thenprobe_adapterfills the placeholder andhas_shifteremits it. The list is built from the three indices now, so drop the placeholder writes and the rescan juggling;accessory_nameholds the S&H's queried name only.refresh_accessoriesoverwritesshifter_connected/adapter_connectedevery second, undoing the press-driventrueinapply_event. With two wheelsDevice::discover()answers for whichever sorts first (see the comment abovecapsin main.rs), so the card flickers at 1 Hz. Pass the selected device intoReader::startand keep one source of truth.- BUTTON_MAPPING says the DB9 Reverse through the base lands on
0x2c3;apply_eventmaps gate 7 (0x2c2) to R. Which did evtest show? Keep that one. - "(RS50 / G PRO, sub-device 02)": the index is the port, not the device (spec 5.3). Also add
Closes #144to the description, and the SYSFS_API "Values" line still says a single name.
…r base
- Detect Logitech Racing Adapter attached to RS50 / G PRO wheel base via
HID++ page 0x8120 (GAMING_ATTACHMENTS) confirmed by 0x0005 device name,
report comma-separated active accessories in sysfs wheel_accessory,
and enable Desktop mode slot routing (0x8120 + 0x1BC0) when either
RS H-Shifter or Racing Adapter is connected to the base.
- Add evdev discovery and decoding for standalone RS Shifter & Handbrake
(046d:c275/046d:c278) and Logitech Racing Adapter (046d:c273).
- Dynamically show/hide the Shifter & Handbrake card sections in
logi-wheel-gui based on connected accessories (via USB or wheel base):
- Sequential Shift Up / Shift Down badges only appear and respond when
RS Shifter & Handbrake is connected (so bare wheel paddles do not
trigger them).
- Separate 7+R (RS H-Shifter) and 6+R (Racing Adapter / Driving Force
Shifter) H-gate diagrams, collapsing to a single diagram when both
are plugged into the wheel base simultaneously.
- Pass the selected device into Reader::start to avoid multi-wheel 1 Hz
flicker, and preserve press-driven accessory connection state.
- Decode DB9 Driving Force Shifter Reverse through the wheel base on
0x2c4 (BTN_TRIGGER_HAPPY5).
- Document standalone and base-connected accessories, DB9 6+R shifter
buttons (0x120..0x126 standalone, 0x12c..0x2c4 via base), and base pedal
axes in docs/BUTTON_MAPPING.md and docs/SYSFS_API.md.
Closes mescon#144
Signed-off-by: Gonzalo Adrio <gonzaloadrio@gmail.com>
eae783f to
f740d65
Compare
|
|
Thanks for the thorough review, @mescon! We've addressed all 5 points in the amended commit, verified each one on physical hardware, and confirmed all 219 tests pass green ( Here is the breakdown with hardware evidence: 1. Adapter Detection &
|
mescon
left a comment
There was a problem hiding this comment.
All five addressed, and the 0x0005 name check settles the probe question without the dmesg. Thanks for pinning Reverse to 0x2c4 on hardware for both shifters; that corrects a row from #140 as well. One leftover in BUTTON_MAPPING: rows 19 and 20 and the "12 to 19" sentence still describe the old theory. I will fold that into the release docs together with the same wording in the README, changelog and wiki, and the two en-dashes. Merging; this goes into 0.43.0 with the H-Shifter.
…lone handbrake) Resolve the two doc hunks in favour of the hardware-verified facts from #139: Reverse is button 20 (evdev 0x2c4) on the H-Shifter and on a DB9 shifter through the Racing Adapter, index 19 is not used, and wheel_accessory lists every attached accessory in a fixed order.
Add the 0.43.0 changelog items for #139: the Racing Adapter on the base, the standalone RS Shifter & Handbrake and adapter on the Test page, and wheel_accessory listing every attached accessory (closes #144). Correct the H-Shifter button range to 12 to 20 with Reverse on button 20 (evdev 0x2c4) in the README and changelog, add the adapter to the README matrix and paragraph, and bring the FEATURE_MATRIX note and the two driver comments above wheel_accessory in line with the three-accessory list. Set the release date.



Summary
Builds on the accessory infrastructure to add userspace discovery, axis/button decoding, and UI monitoring for the remaining Logitech racing ecosystem peripherals when connected via standalone USB or direct-drive wheel base:
046d:c278)046d:c273)Changes
046d:c278):0..1023) for handbrake mode (ABS_Z), displayed with a live progress bar.BTN_TRIGGER/BTN_THUMB) with directional badge indicators in the GUI (gated on standalone handbrake detection).046d:c273):0..4095) for legacy 3-pedal sets: Throttle (ABS_Y), Brake (ABS_Z), and Clutch (ABS_RX).0x120..0x126standalone,0x12c..0x2c4via base) into the UI H-gate monitor.mainline/hid-logitech-hidpp.c):0x8120(GAMING_ATTACHMENTS) confirmed by feature0x0005device name ("Racing Adapter"), preventing any false positive matches on internal sub-devices.wheel_accessorysysfs attribute without placeholder writes.0x8120+0x1BC0) when either RS H-Shifter or Racing Adapter is attached.logi-wheel-gui):Reader::startso accessory polling is anchored to the active wheel and avoids 1 Hz flicker with multiple attached wheels.refresh_accessories.docs/BUTTON_MAPPING.md&docs/SYSFS_API.md):pedal_axes(ABS_RX,ABS_RY,ABS_RZ,ABS_Zon RS50 / G PRO, and G923 PlayStation / Xbox layouts).wheel_accessoryvalues description to comma-separated list ornone.Testing
cargo test --workspace: 219 passed, 0 failed).Closes #144