Repository navigation
fix(ui): effects sent no packet at all, plus a mouse diagram and search-friendly README - #3
Merged
Merged
Conversation
Selecting an effect did nothing at all. The English translation renamed the combo entries but left the dispatch table and one comparison keyed on the old Portuguese names, so `_send_fn` returned None for Steady and Cycle and "Off" never matched — the interface reported "'Off' is not implemented yet" while sending no packet. Fixed at the cause rather than the symptom: the effect names and the send_* function behind each now live in m711pro/core/device.py, and both interfaces derive from there. A test asserts every colour effect has a sender, so a rename cannot silently break the dispatch again. Reads were also making each tab take seconds to open. With the dongle and the cable both present only one node answers, and the silent one cost a full 0.6 s timeout on EVERY read — 6.2 s to load a page. read_register now tries the node that answered last before probing the others: 0.78 s per read down to 0.09 s, and a page from 6.2 s to 0.72 s. The buttons page gains a schematic of the mouse with the eight buttons numbered as the official app numbers them; clicking one scrolls to and highlights its row. It is drawn with QPainter rather than shipped as an image, because the vendor's render is their artwork and cannot go into a GPL repository — the button positions are facts about the hardware, so the layout still matches. Row labels are derived from the same mapping the diagram uses, so the two cannot disagree about which slot is which button — which matters here, because the numbers on the mouse are not the table indices. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Someone looking for this lands on the README, so it now opens with what they typed: the model names it is sold under (M711 Pro, M711-PRO, Cobra Pro), that it runs on Linux without Windows, and the USB IDs they would have just seen in lsusb output. Adds a "Does this work with my mouse?" section with real lsusb lines, points M913 owners at m913-ctl and mouse_m908 instead, and mentions libratbag/Piper for people who checked there first and came up empty. Screenshots of the three pages. They are rendered from our own Qt interface, not the vendor's artwork. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Two commits that landed on the branch just after #2 was merged.
The bug
Selecting a lighting effect did nothing. The English translation renamed the
combo entries but left the dispatch table and one comparison on the old
Portuguese names, so
_send_fnreturnedNonefor Steady and Cycle, and"Off"never matched
"Desligado"— the interface reported "'Off' is not implementedyet" while sending no packet at all.
Fixed at the cause: the effect names and the
send_*function behind each nowlive in
core/device.py, and both interfaces derive from there. A test assertsevery colour effect has a sender, so a rename cannot break the dispatch again.
Verified against hardware — all four effects reach the mouse and read back.
Tabs took seconds to open
With the dongle and the cable both connected only one node answers, and probing
the silent one cost a full 0.6 s timeout on every read. A page does 8-11
reads: 6.2 s to load.
read_registernow tries the node that answered lastbefore probing the others.
Mouse diagram
The buttons page gains a schematic with the eight buttons numbered as the
official app numbers them; clicking one scrolls to and highlights its row. Drawn
with QPainter rather than shipped as an image — the vendor's render is their
artwork and cannot go into a GPL repository, while the button positions are
facts about the hardware.
Row labels derive from the same mapping the diagram uses, so the two cannot
disagree about which slot is which button. That matters here: buttons 6, 7 and 8
are table indices 10, 11 and 9.
README
Rewritten opening for people arriving from a search engine — the model names it
is sold under (M711 Pro, M711-PRO, Cobra Pro), a "Does this work with my mouse?"
section with real
lsusboutput, and pointers to m913-ctl / mouse_m908 for M913owners and to libratbag/Piper for people who checked there first. Screenshots of
the three pages, rendered from our own interface.
🤖 Generated with Claude Code