Skip to content

fix(ui): effects sent no packet at all, plus a mouse diagram and search-friendly README - #3

Merged
mateusands merged 2 commits into
mainfrom
feat/protocol-completo
Aug 8, 2026
Merged

mateusands merged 2 commits into
mainfrom
feat/protocol-completo

Conversation

@mateusands

Copy link
Copy Markdown
Owner

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_fn returned None for Steady and Cycle, and "Off"
never matched "Desligado" — the interface reported "'Off' is not implemented
yet"
while sending no packet at all.

Fixed at the cause: the effect names and the send_* function behind each now
live in core/device.py, and both interfaces derive from there. A test asserts
every 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_register now tries the node that answered last
before probing the others.

before after
one read 0.78 s 0.09 s
a page 6.2 s 0.72 s

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 lsusb output, and pointers to m913-ctl / mouse_m908 for M913
owners and to libratbag/Piper for people who checked there first. Screenshots of
the three pages, rendered from our own interface.

🤖 Generated with Claude Code

mateusands and others added 2 commits August 8, 2026 13:02
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>
@mateusands
mateusands merged commit f7fa874 into main Aug 8, 2026
14 checks passed
@mateusands
mateusands deleted the feat/protocol-completo branch August 8, 2026 16:07
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.

1 participant