Commit Graph

2273 Commits

Author SHA1 Message Date
Yaroslav Chvanov
dcdd7be8d8 tools: remove an unnecessary variable definition 2023-02-24 22:46:34 +03:00
Yaroslav Chvanov
62678baca1 tools: fix incorrect special method signature
They worked fine nonetheless as we only called these manually.
2023-02-24 22:43:37 +03:00
Matt Coffin
f20686b296 steelseries: add support for Rival 650 Wireless 2023-02-24 22:01:15 +03:00
José Almeida
ada99fb72e data: add device Logitech G Pro (X) keyboard
Known issues:
- not possible to change LED color of Caps lock indicator, Scroll
lock indicator and Game Mode button.
2023-02-14 16:49:27 +03:00
Yaroslav Chvanov
4b2b5a2038 ratbagctl: capitalize device type instead of having it in upper case 2023-02-14 16:29:21 +03:00
Julian Kandlhofer
d95328e8cc change misnamed function name
Signed-off-by: Julian Kandlhofer <julian.kandlhofer@gmail.com>
2023-02-14 16:29:20 +03:00
Julian Kandlhofer
4f36371af3 implement 'DeviceType' property
Signed-off-by: Julian Kandlhofer <julian.kandlhofer@gmail.com>
2023-02-14 16:29:20 +03:00
Yaroslav Chvanov
931ec44ff2 driver-hidpp10: fix integer overflow when profile count is unset
Blame C for implicit conversions.
2023-01-27 13:45:13 +03:00
Yaroslav Chvanov
fbdb41b073 hidpp10: return EINVAL instead of aborting
While these indicate an obvious error in the caller's code, there is no
need to crash the whole program because of this.
2023-01-27 13:42:32 +03:00
mistepien
6dcd17d340 data: add additional USB id for Logitech G102 (046d:c09d) 2023-01-06 17:45:30 +03:00
Yaroslav Chvanov
f8080865f4 steelseries: save the firmware version in ratbag device 2023-01-03 04:21:41 +03:00
Yaroslav Chvanov
7e91b3a343 sinowealth: save the firmware version in ratbag device 2023-01-03 04:21:07 +03:00
Yaroslav Chvanov
440292fda1 device: add firmware version API 2023-01-03 04:21:07 +03:00
Yaroslav Chvanov
17f8f0516b libratbag-util: make asprintf_safe() return a char* 2023-01-03 04:21:07 +03:00
Yaroslav Chvanov
7a5b9b4367 Fix typos throughout the codebase 2023-01-03 04:17:44 +03:00
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