Guido Günther
254bf944eb
example: Wait a bit before ending
...
feedbackd terminates feedback when clients disconnect from DBus so
we need to wait a bit before quitting as otherwise no feedback will
be played.
Closes : #65
2022-12-03 12:42:41 +00:00
Guido Gunther
3206976a4a
Merge branch 'calls-vs-feedbackd' into 'main'
...
run: Fix daemon name
See merge request Librem5/feedbackd!89
2022-12-03 12:35:30 +00:00
Guido Günther
b0dc0c64cc
run: Fix daemon name
...
Fixes: 99fc8c2 ("run: Make it easy to run under gdb and document usage")
2022-12-03 12:29:55 +00:00
Guido Gunther
d19e7b4f7d
Merge branch 'update_README' into 'main'
...
Update README.md
See merge request Librem5/feedbackd!88
2022-11-28 10:16:28 +00:00
Chris Vogel
f5391af6b9
README: Mention python example
2022-11-28 10:10:27 +00:00
Chris Vogel
16fc583ff8
README: Mention that DBus disconnect ends feedback
2022-11-28 10:10:27 +00:00
Guido Gunther
482eb05d1c
Merge branch 'ChriChri-main-patch-39100' into 'main'
...
Updated references to documentation
See merge request Librem5/feedbackd!86
2022-11-28 09:30:00 +00:00
Chris Vogel
64956ea4df
docs: Update references to documentation from branch master to branch main.
2022-11-28 10:22:26 +01:00
Guido Gunther
99c12e77d8
Merge branch 'rel' into 'main'
...
Document changes and release 0.0.1
See merge request Librem5/feedbackd!83
2022-11-11 10:02:17 +00:00
Guido Günther
193c0f8e57
Document changes and release 0.0.1
2022-11-11 10:54:55 +01:00
Guido Gunther
1b8d705802
Merge branch 'cleanups' into 'main'
...
More cleanups
See merge request Librem5/feedbackd!80
2022-11-11 09:50:28 +00:00
Guido Günther
2e29f5baf1
fbd: Fix indentation
2022-11-11 09:50:19 +00:00
Guido Günther
db13fc031d
manager: Use FEEDBACKD_UDEV_ATTR
...
It was introduced in
a5b4f99 ("feedbackd: Support visual feedback via LEDs")
2022-11-11 09:50:19 +00:00
Guido Gunther
68189de793
Merge branch 'misc_cleanups' into 'main'
...
tests/integration: Test that "feedback-ended" is propagated through LfbEvent
Closes #62
See merge request Librem5/feedbackd!82
2022-11-10 12:52:07 +00:00
Evangelos Ribeiro Tzaras
d739a33a5f
feedback-manager: Complete DBus call before emitting "feedback-ended"
...
See previous commit adding the test (that now passes) for the reasoning.
Fixes : #62
2022-11-09 11:54:46 +01:00
Evangelos Ribeiro Tzaras
72c7d3ba25
tests/integration: Test that "feedback-ended" is propagated through LfbEvent
...
When no feedbacks are available (either because the requested event does
not exist in the theme or because the system does not have required
capabilities, e.g. no vibration motor or LED) feedbackd will emit a
"feedback-ended" signal (with reason LFB_EVENT_STATE_REASON_NOT_FOUND)
on DBus _before_ completing the event triggering DBus call.
Since the DBus call was not completed yet, LfbEvent will not have
learned it's ID yet and therefore not emit it's own "feedback-ended"
GObject signal.
In this case the test will timeout since the main loop is never quit.
2022-11-09 11:54:44 +01:00
Evangelos Ribeiro Tzaras
efca781f7f
tests/integration: Fix whitespace
...
Remove all tabs in favour of spaces and align function arguments.
2022-11-09 11:54:06 +01:00
Evangelos Ribeiro Tzaras
15d33f4f85
tests/integration: Indicate that callback quits main loop
...
on_event_triggered() is renamed to on_event_triggered_quit()
as we will shortly introduce a variant that does not quit.
2022-11-09 11:50:10 +01:00
Guido Gunther
4d95249bdd
Merge branch 'misc_cleanups' into 'main'
...
Misc cleanup and ease running feedbackd under gdb
See merge request Librem5/feedbackd!81
2022-11-04 08:05:16 +00:00
Evangelos Ribeiro Tzaras
99fc8c2165
run: Make it easy to run under gdb and document usage
...
Having a fast and easy way to run the daemon under gdb can be beneficial
for debugging. For that start the run script with FBD_GDB=1.
2022-11-03 19:44:07 +01:00
Evangelos Ribeiro Tzaras
94001bba78
feedback-manager: Use guint for event id
...
The ID is inserted into a hashtable below with GUINT_TO_POINTER
and is set using self->next_id++ with next_id also being a guint,
so change the type accordingly.
2022-11-03 19:31:57 +01:00
Guido Gunther
1dc58eb99f
Merge branch 'cleanups' into 'main'
...
Some cleanups I noticed while looking at the code
See merge request Librem5/feedbackd!79
2022-10-12 08:25:29 +00:00
Guido Günther
437d8290bf
tests/integration: Check the state of the ended event
2022-10-12 10:19:03 +02:00
Guido Günther
e782032efd
tests: Drop unused variable
2022-10-12 10:19:03 +02:00
Guido Günther
14f99d6e67
lfb-event: Untabify
2022-10-12 10:19:03 +02:00
Guido Günther
dafb18678b
Use g_error() when library is not initalized
...
This makes sure it still works when asserts are disabled.
2022-10-12 10:19:03 +02:00
Guido Günther
8df5d1606e
lfb-event: Use consistent prefix
...
Make async data use the same prefix.
2022-10-12 10:18:59 +02:00
Guido Günther
c659f0adb5
lfb-event: Fix typo
...
It's LfbEvent
2022-10-12 10:13:08 +02:00
Evangelos Ribeiro Tzaras
7391062b87
lfb-event: Notify state change before completing async task
...
lfb_event_trigger_feedback_async() internally uses a GTask to handle
invocation of the user provided callback when g_task_return_*() is
called.
Currently GTask is completed first and only afterwards is the state of
the event being updated which can lead to suprising behaviour in code
like this:
static void
on_event_triggered (LfbEvent *event,
GAsyncResult *res,
CallsRinger *self)
{
g_autoptr (GError) err = NULL;
gboolean ok;
g_return_if_fail (LFB_IS_EVENT (event));
ok = lfb_event_trigger_feedback_finish (event, res, &err);
if (ok) {
LfbEventState state = lfb_event_get_state (event);
/* do something with state */
}
}
In this case `state` would return a stale value that's about to get
changed. Instead it would be better to *first* change the state and only
afterwards complete the GTask.
This also makes the sync and async variants consistent in terms of when
they change the event state.
Closes : #59
2022-10-11 12:32:43 +02:00
Evangelos Ribeiro Tzaras
21399aec6e
test-lfb-integration: Test event state in async callback
2022-10-11 12:32:26 +02:00
Evangelos Ribeiro Tzaras
ad7aa5d1b0
lfb-event: Fix SPDX identifier
...
The library is LGPL-2.1+, not GPL-3.0+
2022-09-24 12:08:19 +02:00
Guido Günther
2e081602f6
data: Drop outdated comment
...
We use the hints since some time, see lfb_event_set_feedback_profile().
2022-07-20 18:32:47 +00:00
Evangelos Ribeiro Tzaras
bdf4403b9d
spec: Clarify feedback noisiness
...
The old wording could be interpreted as the feedback being discarded if
it's noisier than the currently selected profile which is not the case.
Also take the new per application settings into account.
2022-06-24 00:51:51 +02:00
Guido Günther
17c1c2aa24
Document changes and release 0.0.0+git20220209
2022-05-20 10:57:37 +02:00
Luca Weiss
e16202eeb5
fbd-dev-leds: support for multicolor LEDs
...
Add support for multicolor LEDs as supported by the kernel.
Used by Qualcomm devices such as SHIFT 6mq, OnePlus 6, etc.
Documentation:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/sysfs-class-led-multicolor
Co-Developed-by: Dylan Van Assche <me@dylanvanassche.be >
2022-05-17 20:04:23 +02:00
Dylan Van Assche
510f1b6d6e
fbd-dev-leds: rename var to max_brightness_percentage
...
Improve readability of the code.
2022-05-17 20:02:58 +02:00
Dylan Van Assche
572a027fa6
fbd-dev-leds: use define for max_brightness
...
All other attributes use a define, let's do the same for max_brightness.
2022-05-17 20:02:51 +02:00
Guido Günther
5a3e501344
udev: Use more generic comment
...
Make it more obvious that this isn't device specific
2022-03-18 11:08:28 +01:00
Guido Günther
9851d3727f
udev: Drop pre L5 pre 5.9 workaround
...
Not neeed in 2022.
2022-03-18 10:55:15 +01:00
Guido Günther
74b178a363
Document changes and release 0.0.0+git20220208
2022-02-08 11:30:40 +01:00
Guido Günther
16bf78b5a4
manager: Don't sync DBus profile property
...
This will happen in on_feedbackd_setting_changed() once the
profile was adjusted.
2022-02-04 19:03:00 +01:00
Guido Günther
5c8cbfca39
manager: Sync profile with setting on startup
...
On startup the GSetting is the relevant input for selecting the profle.
Closes : #52
2022-02-04 19:03:00 +01:00
Guido Günther
2be41ec0ef
manager: Set initial profile to unknown
...
This makes sure we sync the profile with the DBus property after
fetching it from GSettings.
2022-02-04 19:03:00 +01:00
Guido Günther
a7a123a0b7
tests: Remove unused variables
2022-02-04 19:03:00 +01:00
Guido Günther
ff055cdb35
libfeedback: Remove unused variables
2022-02-04 19:03:00 +01:00
Evangelos Ribeiro Tzaras
b2a8061cdc
doc: Clarify that the timeout is in seconds
2021-10-29 18:00:02 +02:00
Evangelos Ribeiro Tzaras
5f28638eec
fbd-event: Fix return value for fbd_event_get_sender
2021-10-29 17:56:28 +02:00
Evangelos Ribeiro Tzaras
ce8118e920
lfb-event: Clarify docstring on lfb_event_set_feedback_profile
2021-10-29 17:52:56 +02:00
Pablo Correa Gómez
8e9bbd9d4c
Reload theme on SIGHUP signal
...
Fixes #28
Allows for users/applications to request a theme reload
by sending SIGHUP signal to the daemon.
2021-10-19 14:24:04 +00:00
Guido Günther
753fff3e7a
d/changelog: Bump changes line to a recent date too
...
It was still stuck at 2021-10-07. Fixup version too while at that.
2021-10-19 13:15:28 +02:00