Commit Graph

1475 Commits

Author SHA1 Message Date
Peter Hutterer
6f9aa5aa24 Coding style fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:22:19 +10:00
Peter Hutterer
bfe6d446ad Comment typo fixes
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:22:15 +10:00
Peter Hutterer
855a6bd831 Fix error message on ENODEV
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:16:42 +10:00
Peter Hutterer
f5ff267c54 Improve a few error messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:16:39 +10:00
Peter Hutterer
014c4105f4 Remove superfluous check for a NULL udev device
If the udev device is NULL, we should fail a lot earlier

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:16:37 +10:00
Peter Hutterer
52fea6f3ce Remove superfluous check for strdup() ENOMEM
If that happens, strdup_safe() will abort.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 16:16:35 +10:00
Peter Hutterer
97eee9e0c5 ratbagd 0.1.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 12:02:19 +10:00
Peter Hutterer
5cc234e27e configure.ac: add missing AC_SUBST for the dbus config dir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 11:27:16 +10:00
Peter Hutterer
2bbcc51a8b ratbagd 0.1.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 10:40:01 +10:00
Peter Hutterer
1824b977f7 Fix typo in README
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 09:17:34 +10:00
Peter Hutterer
99011fd3bf configure.ac: fix dbus install directories
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-11 09:16:48 +10:00
bentiss
43ab3c961e Merge pull request #68 from whot/wip/query-capability
Add a QUERY_CONFIGURATION capability
2016-03-10 14:31:39 +01:00
Peter Hutterer
f7523f000e Add a QUERY_CONFIGURATION capability
Designates a device that can be queried for the current configuration. Some
devices lack this ability so we rely on the caller to upload a known
configuration to the device before we can really proceed.

Set by default, devices without that capability should be the exception, not
the norm.

This patch just adds the capability, actual handling for this needs to be
added when we add the first device without this capability.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 16:53:55 +10:00
Peter Hutterer
346631cd75 Skip the manual NULL assignment after unref
libratbag guarantees that unref() always returns NULL

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 13:03:56 +10:00
Peter Hutterer
8517e103b0 ratbagd 0.1
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
815a81a610 Spice up the README a bit
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
20b9339620 README: update install instructions for dbus
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
2e93ac07f6 Update gitignore for a few things
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
f385622ec6 Makefile: add a comment marker for the dbus/systemd config files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
de83186c3c Create the dbus directory in $builddir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
fa0d57dd47 Install the dbus config as well
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-10 12:05:40 +10:00
Peter Hutterer
b164fa622f Change to a dbus-activated service
We don't shut down once activated but that doesn't mean we need to run when
never requested.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2016-03-10 12:05:40 +10:00
bentiss
e4c654841b Merge pull request #3 from whot/master
fix cleanup code  and restart on abort
2016-03-09 09:41:26 +01:00
bentiss
a411248c7c Merge pull request #2 from whot/wip/pkg-cleanup
minor autotools cleanup
2016-03-09 09:39:45 +01:00
Peter Hutterer
a066203b4a systemd: fix typo in service file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 14:08:20 +10:00
Peter Hutterer
819c70fa9a systemd: restart on abort
Now that we clean up properly, the most common crash should be fixed. Restart
on abort by default so ideally all we need to do is restart piper or whatever
consumes the API.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 13:45:03 +10:00
Peter Hutterer
9f9383e6ff profile: free the buttons/resolutions on profile cleanup
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 13:45:03 +10:00
Peter Hutterer
70222b3033 Use PKG_CHECK_VAR to check for the pkgdatadir
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 13:10:14 +10:00
Peter Hutterer
5e2d7de6c2 configure.ac: remove a couple of unused items
This configure.ac is largely a copy from systemd so it included things that we
don't use locally.
- we don't use grep, awk or ln
- AC_SYS_LARGEFILE and AC_CANONICAL_HOST are unecessary
- pkg.m4 - if that's missing you don't have pkgconfig installed. stop trying
  to build things then :)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-09 13:04:22 +10:00
bentiss
765ee6c08c Merge pull request #67 from phomes/g9-read-dpi
hidpp10: Fix getting current resolution on G9
2016-03-04 09:02:55 +01:00
Peter Hutterer
aceef4d0d0 ratbagd 0.0.2
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 14:27:18 +10:00
Peter Hutterer
654956baa6 Fix distcheck
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 14:27:08 +10:00
Thomas Hindoe Paaboel Andersen
577a7c52fc hidpp10: Fix getting current resolution on G9
On the G9 the response to a 0x63 is a short report. The G9 does
not have individual resolutions for X and Y and thus only needs
to report a single value.

The set version of 0x63 should probably also be updated. However,
while my testing of such a change worked better than with long
reports there are still strange side effects of setting resolution,
like turning off all the LED's. LGS also seems to do a full profile
read/write instead of using 0x63 when changing the resolution.
2016-03-04 00:19:10 +01:00
Peter Hutterer
212ab08c15 device: export the full path to the SVG as well
Exporting just the filename requires the caller to know where that file sits.
That's useful for things like e.g. icons where callers may several sets to
chose from but here most callers will just use the default svg provided by
libratbag.

Export that, so that we don't have build-time dependencies in the callers just
for that single path.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-04 08:54:26 +10:00
bentiss
18a0be561f Merge pull request #1 from whot/python-bindings
Add a python module for ratbagd, replace ratbagctl with a python version
2016-03-03 15:30:19 +01:00
Peter Hutterer
0528981a0a Replace ratbagctl with a python version
It's a lot easier to interact with ratbagd from a python script than it is
with C code. Plus this means we test the bindings whenever we use ratbagctl.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-03 20:13:10 +10:00
Peter Hutterer
eac1e91638 Add a python module to talk to ratbagd
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-03 20:12:48 +10:00
Peter Hutterer
a8600faeb3 button: use dash, not underscore, for button type names
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-03 15:11:29 +10:00
Peter Hutterer
9c33eede5c Add a COPYING file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-03 14:56:37 +10:00
Benjamin Tissoires
85acab4642 hidpp20: fix correct number of resolutions in the profile
There are only 5 resolutions per profile.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-02 10:54:13 +01:00
Benjamin Tissoires
0b5ccfeaed hidpp20: re-enable G303
The G303 shares the same profile than the G402/G502. The only difference
is an extension at the end of the profile, but they are compatible.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-02 10:50:19 +01:00
Benjamin Tissoires
f108ffa9ff hidpp20: remove internal project name
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-02 10:49:07 +01:00
Peter Hutterer
f233b6bf77 data: add a README on how do do the data files
And update all devices to match the the requirements

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-02 09:09:17 +01:00
Peter Hutterer
c95d8e05ca lur: Add a note that we're not doing OOM
Mostly inherited from our zalloc() implementation. But really,
if you have no memory left, should you be trying to talk to receivers?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-02 09:08:58 +01:00
Peter Hutterer
b3237fd001 lur: change new_from_hidraw to return an errno
Makes debugging slightly more useful than just returning NULL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-02 09:08:13 +01:00
Benjamin Tissoires
7704c102e4 lur: add lur_device_get/set_userdata
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
BT: move the functions in LIBLUR_0.4.0
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2016-03-02 09:08:05 +01:00
Peter Hutterer
55cb7447f9 lur: capitalize use of Logitech Unifying Receiver
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-03-02 14:40:41 +10:00
bentiss
77eaa70f77 Merge pull request #63 from phomes/G9-set-profile
hidpp10: write profile for G9
2016-03-01 23:45:30 +01:00
Thomas Hindoe Paaboel Andersen
70d864af09 hidpp10: write profile for G9 2016-03-01 23:37:54 +01:00
bentiss
15968c8e39 Merge pull request #62 from phomes/g9-features
hidpp10: Add button mappings for G9
2016-03-01 23:12:00 +01:00