Repository navigation
Open the mouse before asking whether it's asleep, and retake the screenshots - #22
Conversation
asleep() called get_power() on the device find_device() hands back, which
isn't open yet. On a wireless mouse that raised AttributeError ('NoneType'
object has no attribute 'ctrl_transfer') whether it was awake or not, so
the script refused every time. It now opens and closes the device around
the read, the same way the window does for each of its own.
Checked on an X3 on the 1K dongle: awake it took all 8 with no warning at
the end, and asleep (50 s untouched) it stopped before the first shot with
the driver's "no reply from the mouse ... within 1000 ms".
Same X3 on the 1K dongle as a91f0b7, taken on main with the script as it ships plus the fix above. Five pages change: the Customize icon in the sidebar, which was the missing-image box in every one of them, and the title bar, now just the close button. The three dialogs came out pixel-identical, so they're left alone.
@f-o-o-g-s's #22 fixed the real bug - the check read the battery on a device find_device() hands back closed, so it raised on every wireless mouse whether or not it was asleep. What's left is the message: an open() that fails is almost always the udev rules, and "move the mouse to wake it, or pass --ignore-sleep" is exactly the wrong advice for that, since --ignore-sleep would then take a full set of empty screenshots. So the probe reports the two separately, and the unreachable one stops the run whatever the flags say.
|
Merged, both commits. Good catch, and a fair one — One follow-up on top (f110422): an The retake was the right call too — the script as it ships, no env tricks, is exactly what someone regenerating from scratch should get. And stepping back: thank you for this whole run. The 1K dongle's battery, charging, link quality and paired-mouse identity; hidraw matched on PID so a dongle can't be mistaken for the mouse next to it; the listener regression I introduced, found and fixed with a CI check that would have caught me; the DPI stage numbering settled on hardware nobody here owns; and the first screenshot set that actually shows the wireless pages. That is a lot of this project's recent surface, and all of it came with the hardware evidence attached. Much appreciated. |
3e6be23's
asleep()callsget_power()on the devicefind_device()hands back, which isn't open yet. On a wireless mouse that raisesAttributeError: 'NoneType' object has no attribute 'ctrl_transfer'whether it's awake or not, so the script refuses every time. It now opens and closes the device around the read, the same way the window does for each of its own reads.Checked on the X3 on the 1K dongle both ways:
Small note on the docstring: on the 1K dongle a sleeping mouse gives that timeout, not a 0xFF reply. It still raises, so the check works either way.
The second commit retakes the set on main with the script as it ships plus this fix, no env tricks. Five pages change: the Customize icon in the sidebar (it was the missing-image box in all of them) and the title bar, now just the close button. The three dialogs came out pixel-identical, so I left them alone. Readings are real again: 1000 Hz, 1600 DPI, 96% signal, battery 85% this time.