Repository navigation
fix(8bitdo): serialize r8 edits, flag silent receiver - #338
onyxhq-dev merged 1 commit into
Conversation
- tell a silent receiver apart from a sleeping mouse - run each setting change to completion before the next
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The change serializes existing R8 setting edits and gives clearer guidance when the receiver is unresponsive. Existing validation and device readback safeguards remain intact, with targeted regression coverage for concurrent DPI edits. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
🎉 This PR is included in version 0.64.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Follow-up to #326, for two review findings that came after it was merged. The third finding there (encode only the known receiver queries) is already on
mainfrom aef7535.readStatusnow says the receiver did not answer and suggests replugging it. Before, it asked the user to move the mouse, which does not fix a receiver that is not responding. A valid "not linked" reply still gets the asleep note.setDpiStageValue,setActiveDpiStageandsetDpiread whole DPI tables, change one slot and write them back. The request queue kept single reports apart but not these read-modify-write-verify sequences, so two concurrent calls on one client could undo each other's stage and then fail verification. Each setter (polling and lift-off included) now runs as one exclusive operation;setDpicalls the shared stage writer inside its own operation, so it cannot deadlock on itself.No frames, layouts or UI hints change.
Testing
npm run checkpasses (3583 tests, build, pack) with an English locale.setDpiStageValuecalls on a stateful fake receiver keep both changes on both axes. It fails without the serialization.🤖 Generated with Claude Code
Note
Serialize 8bitdo HID settings edits and flag silent receiver
exclusivehelper in hid.ts that chains settings operations through asettingsQueuepromise, so polling rate, lift-off distance, active DPI stage, stage values, andsetDpirun one at a time per client. A failed operation does not block later queued ones.writeStageValuemethod shared by the queued stage setters;setDpinow determines the active stage and writes its DPI inside a single queued operation.readStatusnow distinguishes a null link result (receiver did not answer, recommends reconnecting) from a linked-but-idle receiver (asleep or switched-off mouse).Macroscope summarized 031cbc5.
Summary by CodeRabbit