Fix errors related to sleep and power on/off (especially HID++ >=2.0 devices).
Closes#414 by @SonicFrog who originally came up with a similar fix for the connection notice.
* Don't assume 0x41 messages only occur when a device is first paired
(prevents errors when waking from sleep or turning a device on)
* Delay reads/writes when a device is powered on, to prevent broken pipe
errors (hacky solution).
* Don't clear status when a device connects, preventing settings from being
cleared when a device sleeps or is turned off.
* Fix typos.
This K270 is the non unifying version and we know that it has, at
least, one variation (unifying) out there.
M185 mouse is also older, as per PR #337 there is at least two newer
versions of this mouse.
Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
When Solaar is loaded, if a large number of events happen,
it will lose the register events, as the queue size is too
small (16). So, check if the queue is full, in order to
avoid losing those important events.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The best is to make the logitech-hidpp driver to switch to
hid++ notification mode when it starts. As we don't want users
to mangle with it, let's remove support from it.
PS.: I opted to keep this as a separate patch. This way, if
anyone needs to add support for it, in order to debug the
driver, it is just a matter of reverting this patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The event at address 0 is only produced while in HID++ mode.
The rachet event (address 0x10) happens on both HID and
HID++ modes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Set wrongly to HI_RES_SCROLLING. Correct it to HIRES_WHEEL as reported
by MX Anywhere2.
relates to #283
Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
Information from mouse Anywhere MX 2 as provided by @fropeter
Descriptor for mouse based on dump provided
Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
Automatically detect FN swap feature and DPI adjustment on some newer
devices. DPI adjustment partially addresses support for the MX Master
(#208), Smart shift is still missing.
HID++ 2.0 responses are 20 bytes, once you strip the 4 byte common
header and 1 byte sensorIdx, you have 15 bytes left. Since DPI values
are 16-bit words, only 14 bytes should be used.
I own the former and wanted to correct this detail which caused the wrong
model to be shown in GUI.
Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
It's not known whether the DPI ranges can be queried, so let's set
hard-code some values for now. Step size is 200. Does this need to
be changed?
TODO: need a capture of whether this is really a read function.