Zebreus
e39d91cb2d
doc: fix typo in readme
2023-01-02 15:27:46 +01:00
Yaroslav Chvanov
75b9bc9843
doc: fix documentation for disabling resolutions
2022-12-26 23:50:51 +03:00
Yaroslav Chvanov
f595c96495
ratbagctl: fix typo
2022-12-26 23:44:48 +03:00
Yaroslav Chvanov
77fcaf6d28
ratbagd: fix stack smashing
...
A regression I introduced while modifying the disableable resolutions
patch.
It went unnoticed, because it only crashes with optimizations enabled.
In my defense, this exception in D-Bus API that boolean messages must
give address of an int and not a bool is a weird peculiarity...
2022-12-26 23:44:45 +03:00
Yaroslav Chvanov
fdb4d65aa4
sinowealth: implement disabled resolutions
2022-12-25 22:54:16 +03:00
Stephan Lachnit
a624c681a3
driver-hidpp20: implement disabled resolutions
...
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com >
2022-12-25 22:54:16 +03:00
Stephan Lachnit
45118b8fa5
Implement disabled resolutions
...
Implements feature to disable resolutions from a static resolution list.
Updates DBus API and tests accordingly.
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com >
2022-12-25 22:54:16 +03:00
Stephan Lachnit
c99fd654e3
Make order of resolution properties consistent
...
Resolution properties should be in the order (active, default).
Signed-off-by: Stephan Lachnit <stephanlachnit@protonmail.com >
2022-12-25 22:54:16 +03:00
Peter Hutterer
f6bfed4da0
ratbagd: switch Profile.Enabled to Profile.Disabled
...
When a boolean property is optional, the default None value and the False
value both represent a boolean false. So let's rename the property so that the
boolean values cannot be confused, because None and (Disabled == false) have
the same meaning (profile is enabled).
This is an API break.
Fixes #756
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2022-12-25 22:54:16 +03:00
Yaroslav Chvanov
e32145ecc7
ratbagd.py: fix changes to IsActive potentially not being notified about
2022-12-23 23:41:30 +03:00
Yaroslav Chvanov
2031e169ab
ratbagd.py: make the profile dirty after changing report rate
...
This fixes the "Apply" button being disabled after changing report rate
in Piper (once this file gets synchronized there).
2022-12-23 23:40:55 +03:00
Yaroslav Chvanov
6e406d5127
ratbagc: add NONE as allowed action type
...
Fixes button disabling not working with ratbag-command.
2022-12-23 04:27:43 +03:00
Yaroslav Chvanov
d6c5f18362
Revert "tools: convert our enum equivalents to python enums"
...
This reverts commit 95243307ce .
I don't see any reason it has been there at all, and it also breaks
ratbag-command because of probably mistakenly removed Macro.NONE.
2022-12-23 04:26:40 +03:00
Yaroslav Chvanov
876e0cc642
sinowealth: enable button disabling support
2022-12-23 04:01:54 +03:00
Yaroslav Chvanov
56e0ee9279
ratbagctl: check if disabling buttons is supported
2022-12-23 04:01:29 +03:00
Yaroslav Chvanov
9e12c5874c
libratbag: check if disabling buttons is supported
2022-12-23 04:01:09 +03:00
Yaroslav Chvanov
63f8e2c005
ratbagd: fix error handling in ratbagd_button_set_none()
2022-12-23 04:00:13 +03:00
Filipe Laíns
c4cf24308a
hidpp20: enable disabling buttons on onboard profiles (0x8100)
...
Signed-off-by: Filipe Laíns <lains@archlinux.org >
2022-12-23 03:38:19 +03:00
Peter Hutterer
39b8f2bce2
ratbagd: map disabling a button to the existing action type None
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2022-12-23 03:38:18 +03:00
Peter Hutterer
cdf19a904e
libratbag: Fix the action type NONE handling
...
Add the required hooks which were largely missing, remove a check that was a
copy/paste error and add a test button.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2022-12-23 03:34:33 +03:00
Peter Hutterer
95243307ce
tools: convert our enum equivalents to python enums
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2022-12-23 03:34:31 +03:00
Yaroslav Chvanov
9c50116646
sinowealth: enable profile cycling mapping with a preprocessor macro
...
They suck, but we already do have the SINOWEALTH_NUM_PROFILES thing,
let's at least give it all possible capabilities if it is used.
2022-12-23 03:18:13 +03:00
Yaroslav Chvanov
ac86673006
sinowealth: further deduplicate the code of reading config data
2022-12-23 03:18:13 +03:00
Yaroslav Chvanov
5d1b529f4c
sinowealth: explain additional profiles and their pit-falls
2022-12-23 03:18:13 +03:00
Yaroslav Chvanov
9bd9446ce2
sinowealth: add support for writing additional profiles
2022-12-23 03:18:11 +03:00
Yaroslav Chvanov
fe73bb34ef
sinowealth: add support for button actions in macros
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
0bdd0e71ba
sinowealth: improve error handling
...
- No more arbitrary error codes, use POSIX error codes.
- Bubble errors up.
- Add strerror() wherever errno is printed.
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
46711b3624
sinowealth: refactor sinowealth_update_macro_from_action()
...
Reading it was giving me head-ache. This still doesn't feel perfect but
it's already better.
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
c48320134e
sinowealth: fix a missing new line in logging
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
0da7cc10b0
sinowealth: add support for reading 2 profiles (if a macro is set)
...
For what it's worth, all of this may not even belong in libratbag - this
is never going to be shipped to end users, only if someone modifies the
source code. In other words all of this is basically dead code, it's
just me trying to figure out the internal of SinoWealth devices.
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
4621e1016a
sinowealth: deduplicate the code of reading configuration data
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
da92117973
sinowealth: fix a typo
2022-12-23 02:52:00 +03:00
Yaroslav Chvanov
36af0009bd
sinowealth: assert instead of silently ignoring an error
2022-12-23 02:51:59 +03:00
Yaroslav Chvanov
f23f2bfbfb
sinowealth: simply return a bool instead of 0 or 1
2022-12-23 02:51:59 +03:00
Yaroslav Chvanov
007fa34c87
sinowealth: make all casts explicit
2022-12-23 02:51:59 +03:00
Yaroslav Chvanov
a018207728
sinowealth: fix some variable types
2022-12-23 02:51:59 +03:00
Yaroslav Chvanov
e18baf6f36
sinowealth: use non-GNU-specific empty array initializer
2022-12-23 02:51:59 +03:00
Yaroslav Chvanov
991cf92594
sinowealth: print a warning if there are too much events in a macro
2022-12-23 02:51:47 +03:00
Yaroslav Chvanov
a493575daa
test: add device data tests for the steelseries driver
2022-12-22 03:38:31 +03:00
Yaroslav Chvanov
c7e2e13ee0
test: add device data tests for the asus driver
2022-12-22 03:38:25 +03:00
Yaroslav Chvanov
d6b6b0d12c
test: make check_section_driver() a bit more diff-friendly
2022-12-22 03:38:09 +03:00
Yaroslav Chvanov
9450ce18e1
test: increase max DPI in check_dpi_range_str() to 36000
...
o_O
2022-12-22 03:38:06 +03:00
Yaroslav Chvanov
10f03eaf0e
test: fix incorrect character escaping in data-parse-test
2022-12-22 03:04:01 +03:00
Yaroslav Chvanov
8e798c74c9
test: data-parse-test: check all files even if there is an error
2022-12-22 03:03:59 +03:00
Yaroslav Chvanov
c6005b2cb8
test: fix formatting
2022-12-22 02:49:10 +03:00
Yaroslav Chvanov
e2ee8185c2
build: fix data tests not running
...
This will also help with out-of-tree builds.
2022-12-22 02:22:59 +03:00
Yaroslav Chvanov
be79267f9d
test: work-around unsupported Driver section of the sinowealth driver
2022-12-22 02:22:59 +03:00
Yaroslav Chvanov
38d10977b6
test: add wheel to the list of permitted LED types
2022-12-22 02:22:59 +03:00
Yaroslav Chvanov
8a7474b1bd
data: fix missing Driver field
2022-12-22 02:22:29 +03:00
Yaroslav Chvanov
1e4c1d73b8
test: add type hints to data-parse-test
...
This will help us prevent errors like in
41c655090ce9f709db4f7069777741a6b5384d24 in the future.
2022-12-22 02:18:42 +03:00