* Unsupported locale: Fall back to English
For any locale that is not supported, automatically fall back to no
translation, so it is English.
Fixes#2889
* Update lib/solaar/i18n.py
---------
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
* Fix listing hidpp10 devices - bytes vs string concatenation
Fix error concatenating a bytes with a string.
Closes#2855.
Fixes: 5e0c85a6 receiver: Refactor extraction of serial and max. devices
* Update lib/logitech_receiver/receiver.py
---------
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
The Flag enum was applied the value method twice. remove the value
method call from the set_flag_bits in device.py. There is no such value
call in receiver.py set_flag_bits in the same commit so I believe this
was a mistake.
With this fix the LX7 mouse is properly enumerated over a Logitech
C-BT44 Receiver (seen as EX100, compatible 27MHz FastRF protocol)
Close#2850.
Fixes: 72c9dfc5 Remove NamedInts: Convert NotificationFlag to flag
Fixes "solaar show" for hidpp10 device (or at least for 27MHz FastRF
hidpp10 peripherals).
Fixes: 72c9dfc5 Remove NamedInts: Convert NotificationFlag to flag
* Fix: handle `HIDError` in `hidapi.hidapi_impl._match()`
The `open_path()` function may raise `HIDError` but `_match()`, its caller, does not handle it, unlike other cases after opening the path. This affects to the device enumeration process in `hidapi.enumerate()`, causing some devices to be randomly undiscovered.
* hidapi: revert to independent checking of long and short HID++ features with an extensible refactor
* Refactor: too long line
* battery: Extract battery level estimation into function
Test battery level estimation with sharp edges based on predefined
steps. Rename variable for clarity and add type hints.
Related #2744
* battery: Interpolate battery level for some rechargeable devices in percent
Estimate remaining battery based on measured battery voltage. Use linear
interpolation to achieve a smooth line instead of 10 percent jumps.
Fixes#2744
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
Logger enabled checks clutter the code unnecessarily. The checks are
now handled in a custom logger class. Eventually they can be completely
removed in the future.
Related #2664
Split processing of receiver notification into smaller functions.
Extract handler functions for every receiver notification for simple
maintenence and testability.
Related #2273
Implement logger that internally checks if log level is enabled. Thus,
unnecessary log message computation costs are avoid, when logging is
disabled and logging code can be cut in half.
Related #2663