Commit Graph

598 Commits (aa95ed306f3d001d15f350c94e28a1a07940a8bd)

Author SHA1 Message Date
nirenjan 52232b1a14 Stop device threads on daemon termination 2021-07-26 10:12:23 -07:00
nirenjan e0d15961e0 Add signal handlers to handle termination and reload 2021-07-25 15:39:20 -07:00
nirenjan e4d1b6aff2 Add update thread enable flag
Prior to this change, the update thread was only checking on
device_update_needed. However, this causes an issue when calling any of
the set methods where the update thread fires, fails to find a device,
and signals the acquisition thread every 50 ms, since the update flag
was never cleared.

This change adds a thread enable flag for the update thread. The update
thread will check that both the thread enable flag and the update needed
flag are set before proceeding with the call to libx52_update.
2021-07-25 08:42:33 -07:00
nirenjan 9941234bbe Replace printf with PINELOG_DEBUG in main 2021-07-25 08:42:12 -07:00
nirenjan 9970a8edc4 Fix key names for clock formats in default configuration file 2021-07-23 14:31:58 -07:00
nirenjan 2cecd1890a Allow set_led_state calls to ignore unsupported feature 2021-07-23 14:31:14 -07:00
nirenjan bd682cd5c7 Add LED state and brightness functionality 2021-07-23 14:24:22 -07:00
nirenjan 88955418b8 Fix trace log to print section.key 2021-07-23 14:23:11 -07:00
nirenjan 0fa638fa16 Add support for clock and date format 2021-07-23 13:43:21 -07:00
nirenjan 499cad666f Add clock update functionality 2021-07-23 10:13:18 -07:00
nirenjan ae13480717 Allow libx52 calls to return TRY_AGAIN
Some libx52 APIs, notably the clock related ones, can return
LIBX52_ERROR_TRY_AGAIN. This is not a real error, but it is useful
information. It indicates to the application that there is no change
applied to the internal state, and that it should wait until trying
again.

Given that the clock thread calls the libx52_set_clock method every
second, treating the TRY_AGAIN state as a failure and logging it causes
a lot of spurious noise in the logs.  This change ensures that the API
returns a real error before logging it.
2021-07-23 09:43:02 -07:00
nirenjan 6175dcabe6 Remove trace logging in device update thread
Having the trace log in there adds unnecessary logging for no real
reason. It is better to disable the log here to help trace other
portions of the daemon.
2021-07-23 09:41:18 -07:00
nirenjan c45a84bd38 Replace autogenerated stubs with extern functions
This allows us to slowly replace the stubs with the real functions
2021-07-22 15:56:12 -07:00
nirenjan 3bca8da541 Add check for typeof support in compiler 2021-07-22 15:12:37 -07:00
nirenjan 50f77119ff Add stub to apply configuration 2021-07-21 10:49:16 -07:00
nirenjan ac8bb6cdd9 Add threads to find and update X52 device 2021-07-21 00:01:49 -07:00
nirenjan c9cb89f833 Fix syntax of PKG_CHECK_MODULES
Commit 2ce9ff22 replaced the calls to AX_PKG_CHECK_MODULES with
PKG_CHECK_MODULES, but it was done blindly, since PKG_CHECK_MODULES
takes a different number of arguments. As a result, even if the checks
for cmocka and udev succeed, they are still disabled because the
corresponding have_ variable is not set to 'yes'.
2021-07-20 01:38:19 -07:00
nirenjan b81d89aad3 Use relative links in Markdown
[skip ci]
2021-07-20 01:17:34 -07:00
nirenjan 98cc439f05 Remove build status badge from INSTALL.md
[skip ci]
2021-07-19 11:16:28 -07:00
nirenjan e54f6037d4 Fix pinelog builds on MacOS 2021-07-19 11:15:42 -07:00
nirenjan 1b598c2d78 Fix pkg-config check for inih and enable Ubuntu 18.04 builds 2021-07-19 11:09:41 -07:00
nirenjan 13f54588a6 Disable Ubuntu 16.04 builds
Ubuntu 16.04 reached EOL in April 2021, and Github will disable Ubuntu
16.04 runners in September 2021. In order to avoid build failures, this
commit disables builds on 16.04.
2021-07-19 10:35:27 -07:00
nirenjan 9fa1a428a4 Squashed 'lib/pinelog/' changes from b5457f4..321d9aa
321d9aa Add benchmark program to tests
a6e789e Remove config.h.in - this is autogenerated
a3eb2c0 Add method to close output stream and reset to default
fb9b51a Fix format-literal error in clang

git-subtree-dir: lib/pinelog
git-subtree-split: 321d9aaa0eee4b4af4be52c228662c3d32c32ab6
2021-07-19 09:50:42 -07:00
nirenjan 3a68148472 Merge commit '9fa1a428a45eabff0122e199a687068f0e6280dd' into daemon 2021-07-19 09:50:42 -07:00
nirenjan 82c778c7de Update configure.ac to handle the new pinelog method 2021-07-16 16:25:43 -07:00
nirenjan 27eb123062 Update README to include destructor attribute 2021-07-16 08:33:22 -07:00
nirenjan 0d407d77fe Add method to close output stream and reset to default 2021-07-16 08:29:11 -07:00
nirenjan ab946b4a1a Add device manager implementation 2021-07-16 00:30:27 -07:00
nirenjan 5a283672c4 Update instructions to install inih on Arch and MacOS
[skip ci]
2021-07-15 22:20:40 -07:00
nirenjan 2ce9ff2280 Disable AX_PKG_CHECK_MODULES on optional modules 2021-07-15 22:00:14 -07:00
nirenjan 81002444d7 Add LTLIBINTL to enable i18n 2021-07-15 21:53:42 -07:00
nirenjan 8545e28d09 Build and install inih manually on macOS 2021-07-15 19:31:46 -07:00
nirenjan e32f836485 Fix format-literal error in clang 2021-07-15 18:31:01 -07:00
nirenjan fc9bebbe5a Add noreturn attribute to fix compiler warnings 2021-07-15 17:57:51 -07:00
nirenjan 738879f79f Disable building for Ubuntu 18.04
libinih-dev on Bionic does not provide a .pc file, so PKG_CHECK_MODULES
fails on this target. This commit disables the CI build on Bionic until
we have a workaround.
2021-07-15 17:44:08 -07:00
nirenjan fa298455aa Use PKG_CHECK_MODULES instead of AX_PKG_CHECK_MODULES 2021-07-15 17:43:51 -07:00
nirenjan 19859b79c5 Disable Ubuntu 16.04 builds 2021-07-15 16:14:17 -07:00
nirenjan cbe7f00a5a Add daemon framework
This change adds the daemon configuration parser and command line
argument parser. This also adds the associated strings to the
translation files, and integrates the daemon into the existing autotools
build framework.
2021-07-15 15:53:56 -07:00
nirenjan fc8e7b6b95 Add new generated files to .gitignore 2021-07-15 15:47:39 -07:00
nirenjan f82c31a6eb Add support for including inih configuration parser library 2021-07-15 13:52:46 -07:00
nirenjan 4b1d524d39 Integrate pinelog into autotools build framework 2021-07-15 10:33:52 -07:00
nirenjan 50dc946c31 Squashed 'lib/pinelog/' content from commit b5457f4
git-subtree-dir: lib/pinelog
git-subtree-split: b5457f405ecbbe676aea26001780a81426191176
2021-07-14 15:54:58 -07:00
nirenjan fd79166a89 Merge commit '50dc946c3177f5006e4bd63eef4bf67331f59dea' as 'lib/pinelog' 2021-07-14 15:54:58 -07:00
nirenjan dcd878b7cc Move Doxygen generation to separate job
This must run only for commits to master
2021-02-12 21:54:33 -08:00
nirenjan a28c622941 Fix Doxygen generation workflow to use doxygen from apt 2021-02-11 03:55:53 -08:00
nirenjan 36dfdd0ad3 Move Doxygen generation to new job 2021-02-09 07:27:09 -08:00
nirenjan 16b2cf7348 Fix deploy directory 2021-02-09 00:26:50 -08:00
nirenjan 3e2b960c0e Add filter to Doxygen 2021-02-09 00:24:53 -08:00
nirenjan b294a1a950 Add Doxygen generation to build action 2021-02-09 00:21:28 -08:00
nirenjan 2c522b9a66 Add reference to libx52_connect in integration documentation 2021-02-09 00:09:48 -08:00