Prior to this change, if the clock thread is disabled, then
disconnecting and reconnecting the X52 device would cause the daemon to
not detect the transition. As a result, the daemon would stay in a state
where it thinks the device is still connected, and therefore, not
actually apply any of the saved configuration, until it received a
SIGHUP to refresh the configuration.
This change adds a routine that sends a dummy vendor command. This
vendor command does nothing on my X52 Pro (VID 06a3, PID 0762), but
serves as a check to see if the daemon can send vendor commands to the
device. If the device is indeed disconnected, then that is a sufficient
indicator to disable the update thread and re-enable the acquisition
thread.
POSIX.1-2004 requires that localtime() is required to behave as if
tzset() was called, but there is no such requirement imposed upon
localtime_r(). Therefore, we need to call tzset ourselves to ensure that
the timezone fields are updated.
Prior to this change, x52d could only run in the foreground, regardless
of the value of the foreground flag. This change adds the standard
double-fork routine to daemonize the program.
This change also adds a PID file argument to x52d, which is used to
ensure that only one instance of the x52d daemon is running at any time.
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.
Prior to this change, x52test would always assume that the device was an
X52Pro when resetting the device state. This change fixes that
assumption by checking the feature flags, since only the X52Pro has LED
support.
This change also updates the translation files due to the automatic
update because of line numbers being changed.
The previous commit to restore the test order in x52test did not fix the
order in the PO files, which got automatically modified when `make
update-po` ran. This commit restores those changes.
This commit uses the new `libx52_check_feature` API to check if the
device supports LED control. If not, it prints an error message and
exits the LED tests gracefully.
This also reverts commit 45f009ac90, which
had moved the LED tests to the end. Since this is no longer necessary,
it is moved back to avoid any issues with anything that may have relied
on the old order.
This change updates x52test to use the gettext APIs. This also adds a
fake message catalogue to verify that the code is converted correctly
and the translations are displayed.
The fake message catalogue translates the English strings into Pig
Latin, which makes it easy enough for a maintainer to verify that the
changes have been made correctly.
Finally, this also adds some documentation to tell the maintainer or
translator how to make the relevant changes.
This change adds gettext support to libx52 using the Autotools
framework. This should allow translators to translate the error messages
provided by libx52_strerror into their corresponding localized versions.