Guido Günther
584d4ddb6f
doc: Convert manpages to rst
...
This will make it more fun to add details and more manpages.
2022-12-13 13:47:18 +01:00
Guido Günther
2e7483c775
ci: Use bookworm image for package build too
...
No need to fight against old glib and friends in PureOS
2022-12-13 13:47:18 +01:00
Guido Günther
b64ce1290c
Add theme validator
...
Recursively loads a given theme file.
2022-12-12 16:13:38 +01:00
Guido Günther
ef5dd5abca
theme-expander: Also log initial theme file
2022-12-12 16:13:38 +01:00
Guido Günther
9e13793bbe
tests: Help old glib on PureOS along
2022-12-11 17:34:38 +01:00
Guido Günther
9824d1cfc6
README: Document custom themes
2022-12-11 17:34:38 +01:00
Guido Günther
83091be25d
feedback-manager: Handle theme gsetting
...
Update the theme when the gsetting changes
2022-12-11 17:34:38 +01:00
Guido Günther
f5757045aa
manager: Don't load theme in constructor
...
Loading the theme can trigger calls to
fbd_feedback_manager_get_default() which then results in an endless look
as the object isn't fully initialized in constructed. Instead do
the setup in main() which has the advantage that the manager's life
cycle becomes more obvious too.
2022-12-11 17:34:38 +01:00
Guido Günther
c3beac7d41
data: Allow to set feedback theme
2022-12-11 17:34:38 +01:00
Guido Günther
a75cdbbc59
theme-expander: Allow to set the theme to expand
2022-12-11 17:34:38 +01:00
Guido Günther
242519498a
Recursively load themes
...
Themes (other than the default theme) can specify a `parent-name` in the
json file. This theme will be used as a base for the theme. Events and
profiles of the children override those in the parents.
For this we move the lookup code into it's separate class and also add
tests.
Closes : #38
2022-12-11 17:34:38 +01:00
Guido Günther
34f8733b2b
build: Don't include main in lib
...
For that move the error quark to a separate file.
2022-12-08 10:05:47 +01:00
Guido Günther
ba91939c85
Add gmobile library
2022-12-08 10:05:47 +01:00
Guido Günther
4c75f42c7e
ci: Install git
...
Needed for the submodule
2022-12-08 10:05:47 +01:00
Guido Günther
ada82a0ed1
feedback-theme: Allow to get and set parent theme name
...
If set the parent theme's feedbackd and profiles should be merged into
this theme.
2022-12-08 10:05:47 +01:00
Guido Günther
e10b2cc150
feedback-theme: Allow to update theme
...
New profiles are added, existing profiles updated. This will
allow to merge themes.
2022-12-08 10:05:47 +01:00
Guido Günther
d7f97dca51
feedback-profile: Allow to update profiles
...
Allow to add feedbacks from a profile to another one
2022-12-08 10:05:47 +01:00
Guido Günther
29bbe38fb3
feedback-dummy: Add getter for duration
...
Useful in tests
2022-12-08 10:05:47 +01:00
Guido Günther
53677e29ef
feedback-profile: Document hash types
2022-12-08 10:05:47 +01:00
Guido Günther
82a8b91096
feedback-theme: Allow to set name
2022-12-08 10:05:47 +01:00
Guido Günther
1d21bfa0dc
feedback-theme: Use getter
...
Ensures we stay consistent with future changes
2022-12-08 10:05:47 +01:00
Guido Günther
e6f1c351e2
feedback-theme: Fix indentation
2022-12-08 10:05:47 +01:00
Guido Günther
c9404d871e
feedback-theme: No need for constructed
...
We can do all that in init
2022-12-08 10:05:47 +01:00
Guido Günther
96b6af3766
tests: Test feedback theme name
2022-12-08 10:05:47 +01:00
Guido Günther
3c124e8ecd
feedback-vibra: Fix indentation
2022-12-08 10:05:47 +01:00
Guido Günther
3e4f66993e
dir-locals: Simlify consistent JS indenting
2022-12-08 10:05:47 +01:00
Guido Günther
6acdb67b78
Include specifications in the documentation
...
Now that we can use markdown easily add them as they provide
help to the developer what events exist, etc.
2022-12-06 13:58:04 +01:00
Guido Günther
a150c2cbc3
Switch library documentation to gi-docgen
...
Switch from gtk-doc to gi-docgen for the library documentation and
adjust the source files accordingly.
We don't bother about the daemon doc headers as they're not built into
any docs atm.
Closes : #56
2022-12-06 12:44:54 +01:00
Guido Günther
7b7422f98e
build: Bump required meson version
2022-12-06 11:49:13 +01:00
Guido Günther
94880dbc0d
d/rules: Support nodoc build profile
2022-12-06 11:49:13 +01:00
Guido Günther
dfe2cdc665
d/control: Drop Breaks/Replaces on packages long gone
2022-12-06 11:21:04 +01:00
Guido Günther
388cf959ce
d/changelog: Fix typos
...
Gbp-Dch: Ignore
2022-12-05 19:00:18 +00:00
Guido Günther
a6809dccbc
d/control: Add settings schema for the tests
2022-12-05 19:00:18 +00:00
Guido Günther
bbcb396df8
ci: Switch build to bookworm / byzantium
...
Use Debian bookworm for the tests and PureOS byzantium for the
package build
We use the arm64 builder as the amd64 one fails to find a shell in the
bookworm image.
2022-12-05 13:18:23 +00:00
Guido Günther
fbfcce4470
d/gbp.conf: Update branch
...
Missed that one when switching to 'main'
2022-12-03 14:27:57 +00:00
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 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 Günther
193c0f8e57
Document changes and release 0.0.1
2022-11-11 10:54:55 +01: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 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
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
Guido Günther
17c1c2aa24
Document changes and release 0.0.0+git20220209
2022-05-20 10:57:37 +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
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
Guido Günther
d11ea0c555
Document changes and release 0.0.0+git20211018
2021-10-18 17:17:12 +02:00
Guido Günther
3a6b573d9b
gitlab-ci: Switch to bullseye
...
Drop support for buster, this can be handled in downstream builds.
2021-10-18 17:16:12 +02:00
Guido Günther
c88c6cfff5
fbd-dev-sound: Delay sending ended signal
...
Remove the feedback and the associated callback data before invoking the
callback (which then triggers FbdFeebackBased:ended) since we otherwise
remove the data from the currently playing sound from the hash table
instead of removing the data from the sound that just finished playing.
Call flow for a repeating sound before:
on_sound_play_finished_callback()
data->callback()
fbd_feedback_get_ended()
on_fb_ended()
fbd_feedback_run()
g_hash_table_insert(..., feedback, data)
fbd_dev_sound_play()
gsound_context_play_full() [async]
g_hash_table_remove (..., data->feedback) <- removes wrong feedback
So (since the feedback is still the same but only the callback data
changes) we end up removing the data from the currently playing sound
from the hash table and any calls to fbd_dev_sound_stop() would fail
to find data and hence not cancel the playing sound.
Call flow for a repeating sound now:
on_sound_play_finished_callback()
g_hash_table_remove (..., data->feedback)
data->callback()
fbd_feedback_get_ended()
on_fb_ended()
fbd_feedback_run()
g_hash_table_insert(..., feedback, data)
fbd_dev_sound_play()
gsound_context_play_full() [async]
So we remove the data of the currently playing sound before adding
the feedback to the hash table again. No ownership is transfered to
the hash table so no cleanusp need to be changed.
Closes: https://source.puri.sm/Librem5/feedbackd/-/issues/46
2021-10-15 15:12:55 +02:00
Guido Günther
05bd9ae0cb
fbd-dev-sounce: Name data consistently
...
We name it `data` elsewhere. Don't call it `object` in one function.
2021-10-15 15:10:31 +02:00
Guido Günther
48c05be29d
fbd-dev-sound: Rename cancellable to cancel
...
The current name is just confusing
2021-10-15 15:10:31 +02:00
Guido Günther
83ba584a53
feedback-theme: Add camera related events
2021-09-06 12:49:41 +02:00
Guido Günther
587cbf3188
cli: Fix changing global profile
...
For that we must not set a default event.
2021-08-09 11:49:30 +02:00
Guido Günther
3503fe0293
docs: Fix --profile short option
...
It's '-P', not '-p'.
2021-08-09 11:46:30 +02:00
Guido Günther
4f5d3cc253
examples: Unbreak python example
...
The method is `trigger_feedback` not `trigger`.
2021-07-23 15:07:13 +02:00
Guido Günther
48b4bb97d6
Document changes and release 0.0.0+git20210426
2021-04-26 12:36:05 +02:00
Guido Günther
678ae7a22d
fbd-feedback-manager: Don't leak device list
2021-04-26 09:34:23 +00:00
Guido Günther
9c9f767986
fbd-feedback-manager: Don't leak config_path
...
It's assigned multiple times.
2021-04-26 09:34:23 +00:00
Guido Günther
437b19edd4
fbd-feedback-manager: Make sure to dispose sound device as well
...
Fixes another leak.
2021-04-26 09:34:23 +00:00
Guido Günther
11aa38baba
fbd-dev-sound: Use correct cleanup for hash table
...
This went unnoticed since the manager forgot to cleanup
this at all (see follow up commit).
2021-04-26 09:34:23 +00:00
Guido Günther
4c30fafc6e
fbd-dev-leds: Use automatic deep cleanup for device list
...
The current logic was fragile and failed e.g. when the
FEEDBACKD_UDEV_VAL_LED would not match leaking the dev since the
g_object_unref() at the end of the loop was never hit.
Prevent that with automatic cleanup and explicitly ref'ing the
devs we want to use.
2021-04-26 09:34:23 +00:00
Guido Günther
957fa1be83
fbd-dev-leds: Don't leak color
...
g_ascii_strdown() creates a copy already.
2021-04-26 09:34:23 +00:00
Guido Günther
d8f944ed30
fbd-dev-leds: Don't leak enum_name
...
g_enum_to_string() is transfer full.
2021-04-26 09:34:23 +00:00
Guido Günther
d7419f37a1
fbd-dev-leds: Free actual FbdDevLed as well
...
So far we only unref'ed the device.
2021-04-26 09:34:23 +00:00
Guido Günther
9169d8b23b
fbd-feedback-theme: Don't leak JSON node
2021-04-26 09:34:23 +00:00
Guido Günther
dc68afdf5f
Help emacs to indent properly
2021-04-26 09:34:23 +00:00
Guido Günther
04648dcf27
feedback-manager: Track DBus clients and end feedbacks if they go away
...
When the client goes away we build up a list of events to end feedback
for to make sure the hash table isn't modified in place. tThe alternative
approach would be to disconnect the on_event_feedbacks_ended handler,
duplicate the DBus signal emission and use g_hash_table_foreach_remove
but that looks less robust than using the same code path.
Closes : #25
2021-04-22 14:44:30 +02:00
Guido Günther
dc8c8c9594
fbd-manager: Keep DBus sender around
2021-04-22 14:43:30 +02:00
Guido Günther
66bcb31a0e
fbd-event: Add sender property
...
This allows us to store the DBus sender
2021-04-22 14:43:30 +02:00
Guido Günther
abab07a2f2
event: Remove 'g' prefix from common C types
...
This matchs phosh's style.
2021-04-22 14:43:30 +02:00
Guido Günther
0936b5fb09
tests: Run event tests too
2021-04-22 14:43:30 +02:00
Guido Günther
da537aff1e
event: Make log-domain match source file name
2021-04-22 14:43:30 +02:00
Guido Günther
53a02c719c
test-lfb-integration: Test invocation error
2021-02-05 16:56:24 +01:00
Guido Günther
d6e3df7ebc
tests: Run lfb_event_{get,set}_timeout
2021-02-05 16:56:24 +01:00
Guido Günther
8c8382a0d2
lfb-event: Don't leak error
...
Don't leak the error values in the success case
2021-02-05 16:56:24 +01:00
Guido Günther
0a5dac1e53
fbd-dev-sound: Don't warn when sound was cancelled
...
This is not an error per se.
2021-02-05 16:56:24 +01:00
Guido Günther
c95009afd1
fbd-dev-sound: Don't leak GError
2021-02-05 16:56:23 +01:00
Guido Günther
aac3306ad5
Document changes and release 0.0.0+git20210125
2021-01-25 11:00:38 +01:00
Guido Günther
40d318c9aa
feedback-manager: Fix formatting
...
It was off in several places. Now that there's no outstanding
MRs clean it up via
uncrustify --replace -c phosh.cfg src/fbd-feedback-manager.c
2021-01-11 10:35:03 +01:00
Guido Günther
ce02a0a52d
Document changes and release 0.0.0+git20201114
2020-11-14 15:55:30 +01:00
Guido Günther
3b3deddb54
debian: Don't abuse the video group
...
Use a separate group for users that should be able to access
the LED devices.
2020-11-14 15:39:27 +01:00
Guido Günther
5ca5d50027
udev: Update led maching for the librem5
...
The names changed in device tree which tickles up into userspace.
2020-11-14 15:33:27 +01:00
Guido Günther
581b83cd92
gitlab-ci: Honor PKG_ONLY
...
This allow us to get debs quicker
2020-09-30 19:16:37 +02:00
Guido Günther
99e39fba00
sound: Set 'event' media role
...
This allows pa to cork, duck, etc.
2020-09-30 19:16:25 +02:00
Guido Günther
9e2c13a1fe
Document changes and release 0.0.0+git20200726
2020-07-26 13:06:35 +02:00
Guido Günther
5a75f369fc
fbd: Dispose manager at the very end
2020-07-24 14:45:46 +02:00
Guido Günther
665d2abc4a
feedback-led: Don't try to stop led when there's no led device
...
This is not a critical since we prevented submitting initially
but daemon cleanup processes all entries in the theme.
2020-07-24 12:53:13 +02:00
Guido Günther
d137c5895f
feedback-led: Stop the correct led color
2020-07-24 12:53:13 +02:00
Guido Günther
8a631cae3e
feedback-manager: Dispose leds too
2020-07-24 12:53:13 +02:00