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.
Attempt to fix:
$ bin/solaar config master dpi higher
solaar: error: coercing to Unicode: need string or buffer, int found
The DPI choices are integers, therefore cast it to a str.
Fixes the following warnings:
sys:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
sys:1: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
The main window suddenly opening when a battery is critical is very
disruptive. It can pop up on all sort of undesirable scenarios.
Rather than catch users of guard, merely show a notification that the
battery is critical.
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>
* from_device_number raises an exception if no device found, rather than
returning None. So, instead of checking the result, catch the exception.
* Use Attributes.get() method instead of checking containment and using the
index operator. This is really the only correct way, see rhbz#1267584.
Effect of the changes:
Previously, if no device was found this method would raise an exception.
Now it returns None instead.
Previously this method read the value of the attribute corresponding to key
twice, once via 'key in attributes' and again when accessing the key.
Now, it just reads it the one time.
Reason for noticing all these problems:
In pyudev-0.18 the Attributes class is fixed, and no longer has the []
operator or __contains__ method or other methods which require a total
mapping. This patch fixes several bugs while simultaneously avoiding these
removed operators.
Signed-off-by: mulhern <amulhern@redhat.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.
Based on SetPoint6.65.62_32.exe and Options_2.10.73.exe (features.xml,
defaults.xml, LogiOptionsMgr.exe).
The names are based on the named next to the feature ID. For duplicates,
_2 is appended to the name.
This commands helps parsing numbers from debug prints:
strings LogiOptionsMgr.exe |
sed -nr 's/.*(Feature[0-9a-fA-F]{4})/\1 /p' | sort |
awk 'tolower(a)!=tolower($1){print"";a=$1}1;' | less -S