Commit Graph

2183 Commits

Author SHA1 Message Date
Kyoken
e9470ff6f4 asus: add strix impact 2 2022-11-18 11:52:22 +00:00
Yaroslav Chvanov
e26eac95db sinowealth: remove now unused button_set_key_action_from_macro
I first thought that we could use try to use this instead of
full-fledged macros when possible, but the implementation then is going
to look quite messy, so let's just delete this.
2022-11-18 11:52:07 +00:00
Yaroslav Chvanov
d2586a2344 sinowealth: do an assert instead of graceful internal bug handling 2022-11-18 11:52:07 +00:00
Yaroslav Chvanov
dd609c06a9 sinowealth: fix writing of key button action type
It did not work *ever* as the helper function was only called when
action type was `key` but the function checked if it was a `macro`.
2022-11-18 11:52:07 +00:00
Yaroslav Chvanov
925b2a2a0a libratbag 0.17 v0.17 2022-11-09 10:43:27 +00:00
Yaroslav Chvanov
df42eeb1ca CI: update runners to use Node 16
Fixes warnings.
2022-11-09 10:43:05 +00:00
Yaroslav Chvanov
aab91b4b11 data: add another SinoWealth Generic Mouse (258a:0029) 2022-11-09 10:42:34 +00:00
Yaroslav Chvanov
c39640d943 asus: fix include order
It caused an `implicit function declaration` warning.
2022-10-12 22:16:19 +03:00
Kyoken
0c3cfe71a0 asus: remove extern 2022-10-12 21:20:30 +03:00
Kyoken
dcba13152f asus driver 2022-10-12 18:11:28 +03:00
Andreas Grosse
61da98ffd4 Add Support for G502 X over USB 2022-10-10 21:39:53 +02:00
PeakKS
98eec0941a Add support for G502 X Wireless 2022-09-11 19:21:27 -04:00
Yaroslav Chvanov
d8301414c7 libratbag-data: add a missing include
To fix `Declaration of X will not be visible outside of this function`
Clang warnings.
2022-08-02 12:12:42 +03:00
Yaroslav Chvanov
a4da425298 sinowealth: move device-specific data out of the driver
This moves device data out of the driver into device files. However, a
_single_ device file contains data for _several mice_ at the same time.
The reason for this is that different mice by SinoWealth may use the
same VID:PID pair. This is unfortunate, as we only allow a single
device file a given VID:PID pair.

Also move `sinowealth_led_format` enum into a header file and rename
its constants to fit in outside of the driver.
2022-08-02 12:12:42 +03:00
Yaroslav Chvanov
ea7b4b6821 sinowealth: null-terminate the buffer with firmware version 2022-08-02 12:12:42 +03:00
Yaroslav Chvanov
833468b292 sinowealth: use a constant instead of a magic number 2022-08-02 12:12:39 +03:00
Yaroslav Chvanov
cc954af7a7 steelseries: ensure that device has a version number set
Otherwise there would be hard to diagnose errors later on.
2022-08-01 07:55:40 +00:00
Yaroslav Chvanov
213ccce0a8 steelseries: add fallback button and LED count
Otherwise if there is a device file without them set, will try to create
UINT_MAX-1 instances of them and obviously fail with an out-of-memory
error.
2022-08-01 07:55:40 +00:00
Linus
bb6ab46a1a Fix presumed typo 2022-08-01 09:27:27 +10:00
listout
05c5815fb9 Use fprintf instead of error
hidpp files were using the error function from error.h header file.
Unfortunately not every libc comes with this particular header file, so
with this patch we won't be requiring to be rely on error function and
use fprintf function.

Thanks to developer Yaroslav Chvanov <staticssleever668> for the
original suggestion

Closes: https://github.com/libratbag/libratbag/issues/1253

Signed-off-by: listout <listout@protonmail.com>
2022-07-29 14:22:05 +00:00
Thomas Weißschuh
0fc6764b47 libratbag-data: fix possible NULL dereferences
This can happen when a device has not properly initialized and this
fields have not been set.
2022-07-21 09:09:04 +00:00
Peter Hutterer
07b40316fb test: add the Bolt receiver C548 to the receiver list
Listed here: https://pwr-solaar.github.io/Solaar/devices.html

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-06-08 12:23:44 +10:00
Sami Olmari
260e4adffc Add device-file for Logitech MX Anywhere 3B (#1313)
This variant stands for Logitech MX Anywhere 3 for Business.

Bluetooth match only, the receiver is not yet supported by the 
kernel and the device thus has the receiver's USB id

Signed-off-by: Sami Olmari <sami@olmari.fi>
2022-06-07 10:08:16 +10:00
Ilya Guterman
8c3c6598c3 hidpp20: verbose log the get current profile 2022-06-06 17:20:42 +03:00
Yaroslav Chvanov
1140875cd8 sinowealth: fix all devices being detected as generic device 2022-06-06 20:13:19 +10:00
Yaroslav Chvanov
f87bccb370 sinowealth: add data for Marvo Scorpion G961
I did not add the data entry for ratbagd though, as there has been
reported breakage with Ant Esports GM500, which uses the same VID:PID.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
c1955598fe sinowealth: note that debounce time command doesn't work on shorter mice 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
d261458cae sinowealth: limit the resolution to sensor's upper bound 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
ef3822af82 sinowealth: fix crashing on mice with unknown sensors 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
2d8115d2bf sinowealth: detect sensor type automatically 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
4c102358a2 sinowealth: make device detection less imperative
..and rename sensor types along the way:
- Prefix them;
- Fix PMW sensors being named PWM.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
d133d30f62 sinowealth: add numeric IDs to sensor types
These IDs match the ones in SinoWealth's configuration software.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
16a1028e1d sinowealth: add sensor type field to configuration data 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
704d5d2e65 sinowealth: decrease minimal configuration size
Configuration size on 1007 mice is smaller for sure. With these changes
the driver has been reported to successfully work with Marvo Scorpion
G961.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
bef26c1890 sinowealth: make dpi_to_raw return 8 bit number
It would otherwise get converted implicitly anyway.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
85241fdd1b sinowealth: handle RGB_NOT_SUPPORTED explicitly
This should technically be unreachable but this is good for code
quality.
2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
2dea887d2f sinowealth: prefix a function name 2022-06-06 07:54:17 +00:00
Yaroslav Chvanov
2004a3c13e sinowealth: fix a typo 2022-06-06 07:54:17 +00:00
Ilya Guterman
48bccf4c98 hidpp20: fetch active profile index only once
currently the active profile index is fetched for each profile,
this adds unnecessary overhead.

change the behavior to fetch the active profile only once during the driver data initialization.
2022-06-06 15:11:02 +10:00
Andreas Schwab
3ea0d44176 meson.build: use valgrind only if available 2022-05-06 15:33:46 +01:00
Ilya Guterman
3e1bc79aac hidpp20: fix set onboard mode 2022-04-29 01:03:45 +03:00
Yaroslav Chvanov
9715c5c150 libratbag-data: fix a memory leak
In driver data of hidpp10 and steelseries drivers `dpi_list` and
`dpi_range` were allocated with calloc, but never got freed.
2022-04-27 22:16:32 +03:00
Yaroslav Chvanov
07f0eafa57 sinowealth: add support for writing macros 2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
72f8708e0e sinowealth: add support for writing key button actions 2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
6ac5ba6dbb sinowealth: add support for changing button mappings 2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
45a8fd9ec3 sinowealth: add support for reading button bindings 2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
e9dff40258 sinowealth: add types for buttons
This button mapping reading and writing support is partially based on a
previous work of @phomes and @enkore. Thank you both very much!
2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
94f28df134 sinowealth: set button count from detected device 2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
4d646db24f sinowealth: fix rave lighting mode settings being shifted by one byte
Turns out I missed a field a bit lower and made an `unknown` section
bigger to compensate for that.
2022-04-21 00:37:44 +03:00
Yaroslav Chvanov
e21366e5e5 sinowealth: mark color order on Genesis Xenon 770 as tested 2022-04-21 00:37:44 +03:00