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
Peter Hutterer
15b4b4a3ca
tools: pass the verbosity arguments down to ratbagd
...
Starting with -vv, we print out the ratbagd log messages to stdout/stderr,
-vvv switches ratbagd to raw mode. We start at level 2 so that we can have the
single -v reserved for ratbagctl itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-11 09:26:07 +02:00
Peter Hutterer
cad05f1256
tools: parse the argument before starting ratbagd
...
No point starting ratbagd for things like --help or invalid commands
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-11 09:26:07 +02:00
Peter Hutterer
703e1f6f0d
ratbagd: allow for --verbose=raw
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-11 09:26:07 +02:00
Ogier Bouvier
19451f9df7
hidpp20: fix last feature discovery
...
Signed-off-by: Ogier Bouvier <obouvier@logitech.com >
2017-09-08 15:40:55 +02:00
Thomas Hindoe Paaboel Andersen
3314b41202
hidpp10: fix outdated info message
2017-09-08 08:56:03 +10:00
Thomas Hindoe Paaboel Andersen
f636fd8f53
G300: set active resolution
...
For the active profile we read the active resolution
from the mouse during probe.
When changing the active profile we set the default
resolution to active.
2017-09-07 10:30:37 +02:00
Jente Hidskes
77847f570c
tools/ratbagd: remove KeyMapping methods
...
Cleanup after afaf3fa83d .
2017-09-07 10:24:38 +02:00
Peter Hutterer
afaf3fa83d
ratbagd: Drop KeyMapping from the DBus interface
...
Plan is to remove the key mapping altogether and make it transparent from the
Macro mappings (in libratbag/the drivers). Meanwhile, remove the DBus API so
nothing can actually start using it.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-07 08:25:59 +02:00
Peter Hutterer
4c7f644599
hwdb: drop the remaining hwdb files
...
Now that we use the .ini style device configuration and everything has been
migrated, we don't need the hwdb/rules files anymore
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-07 09:21:45 +10:00
Peter Hutterer
692f7f008a
Fix typo
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-07 09:21:45 +10:00
Benjamin Tissoires
0a62c3dfa8
hidpp20: fix mem leak
...
Valgrind complains about it, so let's fix it.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-05 19:18:10 +10:00
Benjamin Tissoires
7cd2cfed44
tools: ratbagctl.devel: fix commit() async call
...
If we leave ratbagctl.devel too soon, ratbagd gets killed before it even
receives the async call for commmit(), meaning everything we do on the
device is lost.
0.5 is empirical. It seems on my system 0.2 is enough (0.1 doesn't seem
to work). Hopefully this value is not device dependent.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-04 19:55:53 +10:00
Benjamin Tissoires
c31e11d385
tools: fix permissions for ratbagctl
...
not sure why, but stat.S_IEXEC only sets exec permission for the user,
meaning that the installed file can't be run by anybody else than root.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com >
2017-09-04 19:55:53 +10:00
Thomas Hindoe Paaboel Andersen
efe6021e76
G300: fix profile switching
...
The profile ID's used are:
profile 0: 0x80
profile 1: 0x90
profile 2: 0xA0
These were miscalculated as 0x80, 0x81, and 0x82.
2017-09-04 09:25:38 +10:00
Stephen Kitt
8d67389042
Don't install ratbag-command manpage
...
Since we no longer install ratbag-command itself, there isn't much
point installing its manpage.
Signed-off-by: Stephen Kitt <steve@sk2.org >
2017-09-04 08:24:34 +10:00
Peter Hutterer
4037587f74
Get the libratbag data dir from the environment variable
...
And set it for the tests, so we can test with in-tree files.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-01 09:49:32 +02:00
Peter Hutterer
94daeb1444
ratbagd: split the test device out into a seprate file
...
It always bothered me that it was in the middle of the normal ratbagd, which
made fiding it more effort than neccessary. Split it out into a separate file
so it's easily identifiable.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-01 09:30:38 +02:00
Peter Hutterer
937b30c415
circle.yml: set LANG to UTF-8
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-01 07:37:03 +02:00
Peter Hutterer
6f0242f05b
Add missing include for stdint.h to libratbag-test.h
...
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net >
2017-09-01 10:53:37 +10:00
Thomas Hindoe Paaboel Andersen
921837fd0f
ratbagctl: typo fix
2017-08-31 21:32:28 +02:00
Jente Hidskes
d06cdcc53c
tools/ratbagd.py: sync with Piper
2017-08-31 15:25:38 +02:00