Skip to content

Fix full-width dial reports and held-rotation event ordering - #10

Open
Lightmarey wants to merge 1 commit into
fredaime:mainfrom
Lightmarey:codex/input-reports
Open

Lightmarey wants to merge 1 commit into
fredaime:mainfrom
Lightmarey:codex/input-reports

Conversation

@Lightmarey

Copy link
Copy Markdown

On ASUS2020 firmware that emits report 0x0A, rotations are signed 16-bit little-endian values. The daemon currently checks only one byte for 1/255, and sends rotation before button-down. That loses larger deltas and prevents consumers from treating the first held rotation as fine adjustment.

Decode reports 0x01/0x0A, forward their full signed delta through the existing Rotate(i) signal, emit only Press(i) edges, and order press-down before rotation and release after rotation. Unrelated reports are ignored. EOF/read failures exit with failure so a session supervisor can reconnect. --no-notify allows a native frontend to suppress the startup notification; the default notification behavior is preserved.

The existing bus name, path, interface and signal signatures are unchanged. This patch is independent of the GNOME frontend and does not add Qt dependencies to the daemon.

Validation:

  • CMake build with BUILD_GADGET=OFF, BUILD_TESTS=ON; all six CTest entries pass, including the existing Qt rotation suite.
  • New standalone C tests cover both report IDs, signed 16-bit boundaries, repeated held packets, press/rotate/release ordering, unrelated IDs and short reports.
  • A real 168-report capture replays to the same 162 rotation gestures, including fine adjustment and no spurious click.
  • The daemon runs as an ordinary user on the ASUS2020 device; a native GNOME consumer successfully connects to its existing D-Bus API. The user confirmed that direct rotation and held fine adjustment still work after migration.

Known validation boundary: hardware replay was captured from report 0x0A firmware. Report 0x01 and larger deltas have synthetic coverage; other laptop models still need hardware confirmation. The KDE graphical gadget was not launched during this test.

Decode 01/0A reports as signed 16-bit little-endian deltas. Emit button edges before held rotation and after release rotation, retaining Rotate(i)/Press(i). Ignore unrelated reports and exit on disconnected input so a session supervisor can reconnect.

Add a notification opt-out and standalone report regression tests.
@Lightmarey Lightmarey closed this Oct 4, 2026
@fredaime fredaime reopened this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants