Commit Graph

38 Commits

Author SHA1 Message Date
Peter Hutterer d8859d1b6a README: headline fix
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-08-14 08:18:39 +10:00
Peter Hutterer ef830c2560 README: make a note that flatpak doesn't use the same directories
XDG_DATA_DIR in flatpak is $HOME/.var/app/org.freedesktop.Tuhi/data/tuhi
vs $HOOME/.local/share/tuhi for normal runs.

Which means switching between flatpak and normal means we lose the UUID and
the stored drawings.
2019-07-18 13:17:47 +10:00
Peter Hutterer d2bfbc49b4 Add the tuhi.in startup script
As a <builddir>/tuhi and <builddir>/tuhi.devel version. The latter runs
in-tree, the former is the one to be installed.

This is this type of script for a number of reasons. The quickest integration would
be to just use multiprocessing and call into the python module instead of
running other generated scripts. But that doesn't work, GLib doesn't like that
much (the GTK UI crashes). See
https://jameswestby.net/weblog/tech/14-caution-python-multiprocessing-and-glib-dont-mix.html

Another option would be to have a single thread because with GObjects we don't
need to care, right? Except that we do because the DBus bindings use sync
calls and that hangs when we have the server in the same process in a single
thread. Fixing the bindings is a bit more involved.

So meanwhile, let's just go for a script that executes the right targets as
separate processes and let the kernel take care of 'threading', that's what
it's there for after all.
2019-07-18 12:54:14 +10:00
Peter Hutterer bc7c55f281 Merge the two directories closer together
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-07-17 21:03:15 +10:00
Peter Hutterer 55164043e3 README: fix spelling of Māori
Fixes #141
2019-07-16 17:03:50 +10:00
Peter Hutterer b16a16abde Add a SyncState signal to the DBus interface
Propagated whenever we start talking to the device (and then again when we
stop). The purpose of this signal is merely that a UI can show e.g. a progress
bar while we're talking to the device to ensure the user something is
happening.

Fixes #138
2019-07-15 09:38:19 +02:00
Peter Hutterer 8cf85c3e5d Fix a few typos 2019-07-11 08:52:22 +10:00
Daniel Martin 1016fb29d0 README: remove duplicate "either on" 2019-06-07 08:34:07 +10:00
Christian Muehlhaeuser 6f9d3dbde4 Link to Arch Linux package tuhi-git in README 2019-06-05 09:22:40 +10:00
Peter Hutterer 0ee18353ef README: the Intuos Pro Paper works now 2018-03-06 09:54:39 +10:00
Peter Hutterer caf1264952 dbus: add file format version negotiation for the JSON data
Export the supported versions in a Manager property and require the client to
request a specific version in GetJSONData. Without that, the server could
never update the format and clients would have to support every single
historical version to make sure they can run against any version server.

Fixes #98
2018-02-19 11:17:18 +10:00
Peter Hutterer 81d20a5193 README: fix outdated doc for GetJSONData 2018-02-19 10:46:57 +10:00
Peter Hutterer a5c9d12a18 README: document live mode
Fixes #89
2018-02-14 16:13:29 +10:00
Peter Hutterer 5e82d1b378 Rename "pair" to "register"
"pair" is alrady taken by Bluetooth and since we have a bluetooth device here,
it can cause confusion. Use "register" instead, with an explanation in the
README for the more paranoid of us.

Fixes #67
2018-02-02 09:23:08 +01:00
Peter Hutterer 31e1f2ad3b Export the Bluez device's object path
Rather than proxying all metadata (name, address, ...) add a reference to the
bluez device instead.

Fixes #60
2018-02-01 10:13:39 +10:00
Peter Hutterer 2a3b32a4fe base: update the battery state to unknown after 5 minutes
If we don't get battery updates for too long, we don't really know anymore
what the battery is like.

Fixes #47
2018-01-31 06:48:59 +01:00
Peter Hutterer e647e20426 Export the battery level/charge state 2018-01-30 18:53:55 +10:00
Peter Hutterer 0dc3cb5f3a README: add a warning that repairing is needed after application switching
Fixes #39
2018-01-30 08:57:28 +01:00
Peter Hutterer 6ee75bdb34 README: drop the Note subheader
Not needed, just append it to the installation instructions
2018-01-30 08:57:28 +01:00
Benjamin Tissoires 04f25a0a38 drop .format(), switch to f{} everywhere
and change some double quotes into single quotes when encountering them.

It's a new project, so force use of Python 3.6 right now

Fixes #29
2018-01-29 21:18:06 +10:00
Peter Hutterer 6ad3851afd wacom: set the device time to UTC time on pairing
And let us handle the local time zone conversions in the client, because
having timestamps in localtime in the daemon is confusing and error-prone (how
is the client supposed to know what localtime was?)
2018-01-29 09:44:50 +01:00
Peter Hutterer ef8747f032 README: rename 'index' to 'timestamp' in GetJSONData 2018-01-29 08:23:25 +10:00
Peter Hutterer 3bc88bbbb6 config: store/load device drawing in the device's directory 2018-01-25 14:55:10 +10:00
Peter Hutterer 7a31a994fb dbus: return the drawings as array of timestamps
As we're planning to cache the data locally, the timestamps are a
unique-enough way that makes it possible to access a specific drawing.
And this way we can also delete some drawings without all other indices
shifting around.

Fixes #16
2018-01-25 14:55:10 +10:00
Peter Hutterer 3d516530c6 wacom: throw the exception (if any) to the "done" handler
Attach an errno to all exceptions, so we can bubble that up to the client
and display a message.

Fixes #24
2018-01-25 14:55:10 +10:00
Peter Hutterer cfa4aca2df dbus: limit StartSearch to one client only
Basically copied from the device's Listening approach.

While it's possible to have multiple clients searching at the same time it's a
niche case and the effort at fixing the race conditions that come from that is
likely not worth the effort.

Let's add multiple simultaneous clients when we have a real need for it.
2018-01-24 19:23:20 +10:00
Peter Hutterer 71dd70cc95 README: fix the API documentation, Pairing* is now Search* 2018-01-24 19:23:20 +10:00
Peter Hutterer daf2693927 Add setup.py
Fixes #17
2018-01-24 19:09:35 +10:00
Benjamin Tissoires 0e6d82dd14 README: document the new listening process
We need to be able to selectively enable/disable listening mode per
device, and the Listening property needs to be updated.

The current approach uses a Listening property as a public state, and the
StartListening()/StopListening() calls to start/stop. The ListeningStopped
signal is just there to carry error codes.

The current design only allows for a single client to trigger listening,
anyone else will see -EAGAIN and has to wait for the property to update.
2018-01-23 14:22:33 +10:00
Benjamin Tissoires 36b9b1cbb7 README: add note about the sensor orientation
The coordinates are provided from the top-left position, but the sensor
is effectively turned. So on the Spark and the Slate, X goes down, and
Y is reversed and goes left.
2018-01-20 12:37:50 +10:00
Peter Hutterer d4405cc1ef Hook up a ButtonPressRequired signal
When the nordic communication requires us to notify the user to press the
button, emit a signal and pass that up.
2018-01-19 13:40:26 +10:00
Peter Hutterer aa1a5e6689 Revamp the pairing process and rename to Search
The previous process had a problem: the device object didn't exist until after
pairing was complete. But to pair we need some user interaction (press button
on device) and thus the ability to send notifications from the device to the
dbus client at the right time. This wasn't possible with the previous
approach.

The new approach:
* renames Start/StopPairing to Start/StopSearch to indicate we're just
  searching, not pairing in the manager
* creates a org.freedesktop.tuhi1.Device object when a suitable device is
  found. That object is not in Manager.Devices, it's "hidden" unless you know
  the object path.
* Sends a PairableDevice signal with the new device's object path
* Requires the client to call Pair() on the device
* If the timeout expires without pairing, the device is removed again
2018-01-19 13:40:26 +10:00
Peter Hutterer 3871fc1d58 README: document the future pairing methods 2018-01-18 10:49:10 +10:00
Benjamin Tissoires f88a5b2222 wacom: disconnect when we have finished retrieving the data
There is no point keeping the connection alive just to drain the battery.
2018-01-17 13:41:35 +01:00
Peter Hutterer 2e716f2278 README: Bamboo Spark notes on how to get the connection dance happening
This device behaves differently depending on whether drawings are available or
not. Spell it out.
2018-01-15 11:24:17 +10:00
Peter Hutterer 8fa2f3503c README: three backticks is enough for code formatting 2018-01-15 11:20:58 +10:00
Peter Hutterer ffcad95337 README: format a bit better for readability 2018-01-12 20:37:22 +10:00
Peter Hutterer ea91eef4bc Add initial README for Tuhi 2018-01-12 07:45:56 +10:00