They way we are currently identifying the type of a receiver (unifying,
nano, lightspeed) in the Receiver class is pretty bad. The correct
approach would be to specify the receiver type name string in
base_usb.py.
Signed-off-by: Filipe Laíns <lains@archlinux.org>
Add application path from the repository to the search paths.
When you Install a project in editable mode (i.e. setuptools "develop mode")
from a local project path, the application path is ``./share``, relative to
git's top level folder. Add this path at the end of search path::
echo "$(git rev-parse --show-toplevel)/share"
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 fixes the python 3.7 incompatibilities arising from 'async'
becoming a reserved word.
The file lib/solaar/async.py is renamed to asks.py. I picked the name
because it defines the TaskRunner class and it's the best I could come
up in fifteen seconds.
The async function in solar/ui/__init__.py is renamed to ui_async, and
the various imports of that function are changed to match.
Without this patch it doesn't build at all. I am running with this
patch applied and everything appears to work as expected.
Signed-off-by: Jason Tibbitts <tibbs@math.uh.edu>
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 "already_known" var actually doesn't track if the device was
already registered or not.
That causes race issues at Solaar, causing it to sometimes not
detect a device.
Change the logic to always call register_new_device if the
corresponding events happen, and updating already_known
to reflect it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>