Yaroslav Chvanov
ea5ca29aa2
steelseries: don't use reserved underscore identifiers
2023-05-19 22:57:12 +03:00
Yaroslav Chvanov
6fcac8a360
steelseries: simplify loop breaking
2023-05-19 22:57:11 +03:00
Yaroslav Chvanov
6e2550ac51
steelseries: add commit error logging
2023-05-19 22:57:11 +03:00
Yaroslav Chvanov
bd65f7f461
steelseries: don't use else after return
2023-05-19 21:50:14 +03:00
Jon
9cc4d71dd0
data: update logitech-g915-tkl.device to DeviceType=keyboard
...
Diverged accidentally from G915 in
4f36371af3 .
2023-04-24 03:54:23 +03:00
Qjammer
7fb3c63e8d
marsgaming: implement Mars Gaming MM4 protocol
2023-04-14 14:23:28 +03:00
Kyoken
70f2e96a66
asus: check mouse in probe, fix asus status code
2023-03-31 09:55:19 +03:00
Kyoken
fdf9c3ce7e
data: fix asus chakram x
2023-03-31 00:00:15 +03:00
Yaroslav Chvanov
d82821fd62
sinowealth: show a more detailed message for unknown mice
...
The string may be a bit too long, but I still think it's a good idea to
guide people in the right direction.
2023-03-19 03:07:43 +03:00
Yaroslav Chvanov
dc9d49a240
data: improve description of possible fields for sinowealth driver
2023-03-19 02:51:19 +03:00
Yaroslav Chvanov
87f6e521e6
sinowealth: store firmware version in device files in the group name
...
It only makes sense, since it's what the section are identified by.
2023-03-19 02:42:47 +03:00
Yaroslav Chvanov
44279ddda3
shared-macro: make startswith() return a const char*
...
The supplied arguments are const, and as such the return type which is
derived from the arguments must also be const.
2023-03-19 02:39:30 +03:00
Yaroslav Chvanov
876c06237e
sinowealth: change device files to match other drivers
...
..specifically the "ButtonCount" and "ProfileCount" keys.
2023-03-19 02:39:21 +03:00
Yaroslav Chvanov
4b936bf478
test: add test for sinowealth driver sections in device files
2023-03-19 01:51:21 +03:00
Yaroslav Chvanov
2522e4ed20
build: remove redundant build targets for tests
...
Initially I made them so that you can run them separately to see their
output, however, this can be done with meson out of the box. E.g.,
replace:
`ninja -C builddir python-black-check`
with
`meson test -v -C builddir python-black-check`.
2023-03-19 01:30:10 +03:00
halting
b137c61b9f
Revert "g300: use the correct step size"
...
This reverts commit 20b573668e .
200-2500 DPI range and 50 DPI step don't works as expected on Linux.
2023-03-18 18:03:14 -03:00
Yaroslav Chvanov
cb196e16bb
libratbag: don't allow disabling active profile
2023-03-09 18:33:02 +03:00
Yaroslav Chvanov
d259da5d42
test: check that active profile can't be disabled
...
This is failing right now.
2023-03-09 18:33:02 +03:00
Yaroslav Chvanov
115ee47787
libratbag: don't allow setting disabled profile as active
2023-03-09 18:33:02 +03:00
Yaroslav Chvanov
890d8313fd
test: check that disabled profile can't made active
...
This is failing right now.
2023-03-09 18:31:38 +03:00
Yaroslav Chvanov
6e06fe7245
tools: fix printing of macros with buttons in them
...
As the fields are not always keys, also don't strip the first four
symbols of the string.
(as it's not always obvious what the stripped string can be, for example
BTN_0 and KEY_0).
2023-03-09 17:07:28 +03:00
Yaroslav Chvanov
1ffbae54a7
ratbagd: change type of a variable to fix stack smashing
...
sd-bus requires an int variable to be passed to SD_BUS_TYPE_BOOLEAN
calls, see man sd_bus_message_read (3).
We have had an issue of the same sort recently in
77fcaf6d28 which was in some freshly new
code, but this time it's something we have been shipping for a while.
2023-03-08 19:34:28 +03:00
Yaroslav Chvanov
072c1845b2
fixup! sinowealth: read profile count from the device file
2023-03-07 05:38:31 +03:00
Yaroslav Chvanov
2f5a7a5628
data: add SinoWealth driver to the example device file
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
d658dba612
sinowealth: check if ButtonCount field in device file is correct
...
Fixes such scenario:
Set ButtonCount to -1.
Start libratbag.
Watch sun burn.
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
17d869d5bf
libratbag-data: set fallback value in the same place as the proper value
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
fd6e693e88
sinowealth: don't try to live through errors while committing
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
e712b4f1eb
sinowealth: fix logging using wrong member
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
ca7d4f78fc
data: enable second profile for T-Dagger Imperial T-TGM310
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
a1e2159a4f
sinowealth: allow up to three profiles
2023-03-07 05:35:17 +03:00
Yaroslav Chvanov
b39f2794cb
sinowealth: conditionally enable writing profile-switching bindings
2023-03-07 05:35:16 +03:00
Yaroslav Chvanov
a8320f7eb7
sinowealth: use early return
2023-03-07 05:35:16 +03:00
Yaroslav Chvanov
59d85e0bf8
sinowealth: change "profile-up" button binding to cycle
...
I can't explain this, I'm SURE it wasn't cycling before and was just
getting stuck on the highest profile. What?
2023-03-07 05:35:16 +03:00
Yaroslav Chvanov
26cc246a4c
sinowealth: read profile count from the device file
2023-03-07 05:35:16 +03:00
Yaroslav Chvanov
dfd9be05ab
sinowealth: add "cycle LED modes" binding to unknown
2023-03-07 03:38:22 +03:00
Yaroslav Chvanov
fd3ce088b0
sinowealth: make an error message less generic
2023-03-07 03:30:45 +03:00
Yaroslav Chvanov
8fdf0de849
sinowealth: rename MAX to the variable with maximum profile count
...
It can go UP TO this count, it's not necessarily this number.
2023-03-07 03:19:41 +03:00
Yaroslav Chvanov
d2ee857d05
sinowealth: add and use profile count in drv_data
2023-03-07 03:18:53 +03:00
Yaroslav Chvanov
40e1785bcc
sinowealth: check for device compatibility as soon as possible
2023-03-07 03:13:23 +03:00
Yaroslav Chvanov
9a0972891a
sinowealth: update the comment about profile count
2023-03-07 03:04:53 +03:00
Yaroslav Chvanov
224985e28c
sinowealth: add command IDs for the third profile
2023-03-07 02:55:09 +03:00
Yaroslav Chvanov
3b7fc7a662
ratbagctl: show if a profile is dirty
2023-03-07 00:31:10 +03:00
Yaroslav Chvanov
c4ee9d707d
ratbagd.py: sync with Piper
...
- Fix a regression of profile not getting dirty after property changes.
- Add `notify` signals for more things.
- Do some minor refactoring.
2023-03-07 00:23:14 +03:00
Yaroslav Chvanov
52e21d767d
libratbag: take constant pointers where possible
2023-03-07 00:12:09 +03:00
Yaroslav Chvanov
364948c32a
libratbag: remove fall back for Logitech devices
...
This should be unreachable because we `Driver` field must be set in
device files, otherwise they are ignored. Our tests also catch this.
Anyway, it's always better to be explicit about this.
2023-03-06 23:44:06 +03:00
Yaroslav Chvanov
e9604305d1
libratbag-data: use the dpi_list_free helper
2023-03-06 23:42:31 +03:00
Yaroslav Chvanov
2734bc17de
libratbag-util: make dpi_list_free() be able to take NULL
...
free() can take NULL without errors, and so should such helper.
2023-03-06 23:41:40 +03:00
Yaroslav Chvanov
2a356736f7
Fix drivers making profiles dirty while probing
...
Fixes drivers calling public API functions which should only be called
by the consumers of the library. The real problem here is that we don't
have a clear separation between driver API and public API.
This is just a simple search and replace, so there be more such things.
2023-03-05 16:32:03 +03:00
Yaroslav Chvanov
822f37a68c
libratbag: check if profile is dirty in sanity check
2023-03-05 16:32:03 +03:00
Yaroslav Chvanov
1df7316195
libratbag: check if driver supports committing
...
There could be segmentation faults with the openinput driver.
2023-03-05 16:32:03 +03:00