Peter Hutterer
186a1deda8
led: change RGB to RGB888 and add 1-bit RGB
...
1-bit RGB is needed for the Logitech G300, let's rename the main RGB to
indicate how many bits we actually have.
See #335
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-10-03 08:58:34 +02:00
Thomas Hindoe Paaboel Andersen
132212652f
G9: add .svg for GNOME
2017-10-02 22:31:40 +02:00
Peter Hutterer
5a40d93a30
ratbagd: disable coredumps in ratbagd.devel
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-10-02 10:25:24 +02:00
Peter Hutterer
f62940c1e5
tools: specify the full path for the dbus permissions file
...
Since we unconditionally call unlink() on that path later, let's make sure
we actually copy to that file.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-10-02 10:25:24 +02:00
Peter Hutterer
0f808ed387
tools: fix a linebreak to be less confusing
...
We os.path.join the first to arguments, fix the line breaks so this is obvious
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-10-02 10:25:24 +02:00
Peter Hutterer
d8edf2d9e4
tools: unlink the dbus file if ratbagd.devel fails to start
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-10-02 10:25:24 +02:00
Jente Hidskes
6827f5ed81
tools/ratbagd.py: sync with Piper
2017-09-30 08:51:50 +10:00
Thomas Hindoe Paaboel Andersen
f3208b499b
G300: set the color depth
2017-09-29 00:18:22 +02:00
Thomas Hindoe Paaboel Andersen
94e0842a06
G300: add support LEDs
2017-09-29 00:18:22 +02:00
Thomas Hindoe Paaboel Andersen
e0de98ba01
set CAP_LED for mice with only 1 LED
...
Even if there is only 1 LED we should set
the cap to let Piper change it in the GUI
2017-09-28 09:06:28 +10:00
Thomas Hindoe Paaboel Andersen
1adb147f6d
expand documentation of probe call
...
Add a comment that drivers are expected to initialize and
read all profiles in the probe callback.
Fixes #333
2017-09-28 09:05:59 +10:00
Peter Hutterer
b1c4bba3b2
led: add support for color depth
...
The initial value of 400 in the enum is chosen so it looks weird when someone
tries to interpret the value as integer. Values of 1, 2, 4, etc. could be
confused with something realistic.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-22 09:18:28 +02:00
Thomas Hindoe Paaboel Andersen
cdbdcd23e6
G300: set min/max DPI
2017-09-21 19:21:28 +02:00
Thomas Hindoe Paaboel Andersen
23d1290b22
G300: set the active resolution
...
It was implemented but never used before. Use it when writing the
active profile.O
2017-09-21 08:51:21 +10:00
Thomas Hindoe Paaboel Andersen
5edcdfba5b
G300: use int instead of signed
2017-09-20 15:55:37 +10:00
Thomas Hindoe Paaboel Andersen
6d105a002c
G300: fix writing multiple profiles
...
Writing multiple changed profiles was broken as we would exit the
loop after the first profile write. We were returning the number
of bytes written and this was interpreted as an error.
Fix it my returning 0 when we have written the correct number of
bytes to the mouse.
2017-09-20 15:55:37 +10:00
Ogier Bouvier
3b1a41f154
hidpp20: fix special button mapping
...
fix #348
Signed-off-by: Ogier Bouvier <obouvier@logitech.com >
2017-09-19 13:48:17 +02:00
Peter Hutterer
0153efbf9c
Remove now superfluous libratbag.sym
...
We don't ship a library anymore, so dealing with library symbols isn't
necessary.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-18 14:24:50 +02:00
Jente Hidskes
db34ab5255
RatbagdButton: fix missed dbus return value
...
I missed this one in #336 .
2017-09-17 21:34:47 +10:00
Benjamin Tissoires
52e10d029f
tools: ratbagctl.test: assert on the ratbagd process
...
If we could not start the process, there is a high chance we are running
the tests against a different ratbagd implementation so there is no point.
Also, an exception will get raised later during the tear down of the
module saying that "'NoneType' object has no attribute 'terminate'".
This is less than ideal to notify that the process has not been started.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-15 08:55:34 +02:00
Benjamin Tissoires
1c94ef5c56
tools: ratbagctl: only warn that no devices are available in list_devices
...
If the other commands try to access a node, there will be an other error
("Unable to find device X"). So there is no points in having this as a
global check.
For the .devel and .test versions, we are guaranteed to have the
test_device at least, so no worries on this side too.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-15 08:55:34 +02:00
Benjamin Tissoires
5efd83fc41
tools: make sure we check for ratbagd_process returncode
...
It was accidentally put as a dead code in 6cfca9e34b .
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-15 08:55:34 +02:00
Jente Hidskes
33966989db
ratbagd: add ACTION_SPECIAL_INVALID to the table
...
So we at least don't crash, see #383 .
2017-09-14 16:02:56 +02:00
Ogier Bouvier
c56c76e07d
hidpp20: fix resolution count detection
...
fix #343
Signed-off-by: Ogier Bouvier <obouvier@logitech.com >
2017-09-14 16:02:40 +02:00
Thomas Hindoe Paaboel Andersen
8440a36f92
G300 SVG: add 20 px margin
2017-09-14 09:49:41 +02:00
Thomas Hindoe Paaboel Andersen
3e31b45db0
SVG for G300 in GNOME theme
2017-09-14 09:49:41 +02:00
Ogier Bouvier
548a40dba6
hidpp20: store correct size for feature list
...
Signed-off-by: Ogier Bouvier <obouvier@logitech.com >
2017-09-13 10:17:37 +02:00
Benjamin Tissoires
c437882e96
tools: ratbag-command: info: make use of _cleanup_
...
Better code :)
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Ogier Bouvier
4a61dc413b
support sector size that are not multiple of 16
...
Signed-off-by: Ogier Bouvier <obouvier@logitech.com >
Squashed the comment into this
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
59df7defdb
tools: add hidpp20-reset
...
Basically a nuclear weapon to reset the flash to 0.
Use it with caution!
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
77fa6a1e65
hidpp20: fill in all profiles, even if they are not there
...
If a profile is either wrong or not there, we rely on the ROM to get
a correct profile.
Fixes #280
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
0f8031c201
hidpp20: add commit API for onboard profiles
...
The driver is supposed to prepare everything in memory and then, at the
end commit on the device.
Bug #280 is still not fixed as we should initialize empty profiles first.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
5842dccc2a
hidpp20: check if crcs are valid once on plug
...
To check if device is using ROM or Flash settings.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
0c5b1998a5
hidpp20: move down hidpp20_initialize
...
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
f52ebd0dba
hidpp20: move up hidpp20_internal_profile
...
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
1857378a76
hidpp20: new memory model
...
Only reading/writing full sectors are allowed (because we need to set and
read the crc anyway).
Fixes #122
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
d2600583bb
hidpp20: do not mixed hex and decimal
...
because this is bad
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
e2a4684f83
hidpp20: use min when possible
...
s/x <= y ? x : y/min(x, y)/
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
ed39cf3dee
hidpp20: reshuffle onboard_profile allocate/initialize
...
allocate was actually both initializing and allocating through initialize.
Things started to get complicated.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
c4d3b1e606
hidpp20: fix Invalid writes
...
Valgrind complains...
Fixes 19451f9df7
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Benjamin Tissoires
be1fb30751
tools: ratbag-command: fix a memory leak
...
valgrind complains that we did not release the profile, so we shall.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-13 09:21:53 +02:00
Jente Hidskes
a2b3c32124
RatbagdResolution: clamp values instead of returning an error
...
We cannot return error codes, but requesting a resync is overkill.
Instead, let's be nice and clamp these values.
2017-09-13 08:44:50 +10:00
Jente Hidskes
26e7237010
RatbagdLed: clamp values instead of returning an error
...
We cannot return error codes, but requesting a resync is overkill.
Instead, let's be nice and clamp these values.
2017-09-13 08:44:50 +10:00
Jente Hidskes
26a6215122
RatbagdResolution: rename get_rate to get_report_rate for consistency
2017-09-13 08:44:50 +10:00
Jente Hidskes
376adfdf2a
ratbagd: fix return values in dbus methods
...
See #316 .
2017-09-13 08:44:50 +10:00
Jente Hidskes
d990e3f027
RatbagdDevice: add a Resync signal
...
This signal is emitted upon an internal error, signalling clients to
resync their values.
Related to #316 .
2017-09-13 08:44:50 +10:00
Jente Hidskes
2473f66cb3
Move note on return values to the interface documentation
2017-09-13 08:44:50 +10:00
Jente Hidskes
8e9bf7b48a
Add the Name property to the interface documentation
2017-09-13 08:44:50 +10:00
Peter Hutterer
7edae05b37
ratbagd: fix verbose_raw setting
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-11 19:05:51 +10:00
Peter Hutterer
909749fc00
tools: drop the parser debug printfs
...
Not required anymore, I think
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-11 09:26:07 +02:00