Commit Graph

609 Commits (1902ca0d272392eee95817972023cc92067ad78e)

Author SHA1 Message Date
nirenjan 7a4d63adc1 Merge commit '8db1be2ba8dc66d3abf69a8360990c659bf28f16' into daemon 2021-07-27 17:02:49 -07:00
nirenjan 06b8d15dda Make stringification function names similar to libx52io 2021-07-27 09:34:57 -07:00
nirenjan 50906b0a92 Ensure x52d.conf is included in the distribution tarball 2021-07-27 03:07:52 -07:00
nirenjan 009fba0151 Install x52d.conf to sysconfdir 2021-07-27 02:26:32 -07:00
nirenjan 386174d2a4 Update package version 2021-07-27 02:18:35 -07:00
nirenjan d003e7f7c4 Make daemon use libx52 stringification functions 2021-07-27 02:13:59 -07:00
nirenjan 018852a012 Add stringification functions to libx52 2021-07-27 02:00:39 -07:00
nirenjan 77606ae906 Use lookup table to implement *_strerror 2021-07-27 01:35:31 -07:00
nirenjan 602071612d Add DoxygenLayout.xml to distribution 2021-07-26 17:07:11 -07:00
nirenjan f422202ec8 Update translations and logs for setting config parameters 2021-07-26 11:02:38 -07:00
nirenjan bd2dbbb9cc Make thread startup and shutdown logs as INFO 2021-07-26 10:30:29 -07:00
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