Commit Graph

14 Commits (945ddc63a35f89214ff3efa9cb319bc869c52247)

Author SHA1 Message Date
nirenjan 945ddc63a3 Update for release 0.2.1 2020-06-28 13:31:25 -07:00
nirenjan cdd5e773e2 Update Changelog.md 2020-06-07 02:30:14 -07:00
nirenjan b6ebdef7ef Handle time out of range in libx52_set_clock
Prior to this change, the assumption was that localtime/gmtime would
never fail, regardless of the time value provided to it. However,
testing on an Ubuntu 20.04 machine revealed that the representable
range of time_t was about 56 bits, values that exceed a 56 bit
representation would cause localtime/gmtime to return a NULL pointer.

This change replaces the use of localtime/gmtime with their
corresponding thread-safe variants, and checks the return value against
NULL. If it matches a NULL value, then it will return an error and not
update the clocks.
2020-06-04 15:34:03 -07:00
nirenjan c86e3f027a Add install rule for Doxygen generated docs 2020-05-26 16:16:54 -07:00
nirenjan d9ae8d4b79 Add connect/disconnect methods to libx52
Prior to this change, libx52_init needed a supported joystick to be
plugged in, otherwise it would fail with LIBX52_ERROR_NO_DEVICE. This
change modifies the behavior so that libx52_init would still succeed,
but the application should call libx52_connect to make sure that the
device handle is valid. libx52_init still tries to connect to the
joystick, but absence is no longer treated as a failure.

This change also modifies x52cli to check that the joystick is actually
connected before calling the individual handlers. Because libx52_init no
longer fails if the joystick is absent, we need to rely on the return
code from libx52_connect.
2020-05-23 02:18:40 -07:00
nirenjan cc8d6e9344 Revert hotplug support in libx52
This removes the earlier work done in libx52 to support USB hotplug.
This wasn't adequately tested, and the reason to have hotplug support
was to address perceived deficiencies in the standard API.

However, on recent reflection and experimentation, it seems to be easier
to support adding methods to connect to an X52/X52Pro joystick
dynamically after initializing the library. This approach also lends
itself to adding checks when sending control packets to close the device
handle when it detects device disconnection. Also, one could add a
disconnect method to disconnect from any connected joysticks.

Finally, this commit reverts a series of commits that chronicled my
journey into implementing hotplug support and simulating it in
libusbx52. By coalescing the revert into a single commit, it makes it
easier to revert the revert in the future, if necessary.
2020-05-22 00:42:01 -07:00
nirenjan 97743d4ebd Add internationalization support for x52test
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.
2020-05-20 14:36:40 -07:00
nirenjan 3949550b65 Update ChangeLog.md
[skip ci]
2020-05-18 15:08:54 -07:00
nirenjan 1c822f9d6b Update ChangeLog.md 2020-05-18 15:06:19 -07:00
nirenjan 42f416af1d Update version and changelog for hotplug support 2020-04-14 18:38:12 -07:00
nirenjan 152a3e7932 Update for release 0.2.0 2020-04-14 18:30:16 -07:00
nirenjan f9639a9a00 Update ChangeLog
[skip ci]
2020-04-13 00:44:33 -07:00
nirenjan f3270def9d API change for libx52
- libx52_init returns the libx52_device in an output parameter and
  returns a libx52_error_code
- Make all functions return libx52_error_code
- Update package version to indicate incompatible API change
2017-08-23 19:30:35 -07:00
nirenjan fb222dda89 Add Changelog 2017-08-19 15:59:57 -07:00