Fix AmigaHID-pico with GL.iNet Comet (GL-RM1)#43
Open
reinauer wants to merge 5 commits into
Open
Conversation
Keep mouse motion in 16-bit accumulators and preserve divider remainders between output batches. This stops small axis-only movement from being dropped before it reaches the Amiga quadrature generator. It also aligns the initial quadrature state with the idle line levels used at init.
Show HID mount state on the OLED, including device address, instance, protocol and receive-report status. Also print the latest mouse deltas and button bitmap, and reset stale report counts on mount and unmount so the status line stays accurate.
Add DEBUG_MOUSE and DEBUG_KEYBOARD build options so the per-report mouse trace and per-key keyboard trace can be compiled out of the default build. This keeps the debug code available when needed without forcing the hot input paths to update UART and the OLED on every event.
Replace the shared x/y accumulators with a queue-backed handoff between the USB host side and the quadrature output loop. This removes the racy cross-core read-modify-write pattern that could drop motion under load. It also lets the quadrature loop merge newly arrived deltas between output steps.
Add DEBUG_HID_STATUS so the OLED HID mount and receive status line can be compiled out of the default build. This keeps the status display available for diagnosis without forcing line 2 updates in normal use.
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.
The GL-RM1 is a PiKVM fork that can be purchased off Amazon for 115$ right now.
Turns out it would be the perfect and fairly affordable KVM solution for getting
an Amiga connected. However, there were a two of issues when attempting to
use it in combination with the amigahid-pico:
left and right at the same time.
This patch train solves both of these issues and makes this combo work like a charm.
Three of the commits are adding debugging that was useful along the way (and that
you want to leave turned off if latency is at all important to you as an I2C transfer
to the OLED is very expensive):