Kyoken
2eeacc354f
implement key bindings feature
2022-12-22 00:51:59 +03:00
Yaroslav Chvanov
0f39b0f1e9
asus: use ARRAY_FOR_EACH
2022-12-20 04:44:04 +03:00
Yaroslav Chvanov
8c528b2ec0
asus: make pointer variables const wherever possible
...
Also fixes `ASUS_BUTTON_MAPPING` being duplicated between different
source files if I understand C right.
2022-12-20 04:44:04 +03:00
Yaroslav Chvanov
0656d7896c
libratbag-data: fix formatting
2022-12-20 04:44:03 +03:00
Kyoken
4187aa4123
asus: allow empty cells in bindings table and fix pugio button bindings
2022-12-07 23:32:03 +03:00
Kyoken
f9286536f8
asus: fix button mapping type
2022-11-26 00:46:37 +03:00
Kyoken
0cf97d40af
asus: handle undefined buttons
2022-11-26 00:46:37 +03:00
Kyoken
b93900bd91
asus: rename params
2022-11-26 00:46:37 +03:00
Kyoken
e628b50abf
asus: add spatha x
2022-11-26 00:46:37 +03:00
Kyoken
3e5ac899ae
asus: fix building errors
2022-11-26 00:46:37 +03:00
Kyoken
041a8023b8
asus: button mapping reworked
2022-11-26 00:46:32 +03: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
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
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
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
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
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