Commit Graph

117 Commits (55963ba8247d583202b2f77379fec6dda86c4367)

Author SHA1 Message Date
nirenjan 55963ba824 Merge branch 'feature/automated-tests' 2017-07-27 20:52:09 -07:00
nirenjan a2496d5d28 Add realpath to Travis-CI
This package is necessary for the tests, otherwise the script will error
out with a missing "realpath" error.
2017-07-27 20:47:59 -07:00
nirenjan c79373676f Fix distcheck failure 2017-07-27 20:10:21 -07:00
nirenjan e463d9b890 Add tests framework and LED tests 2017-07-27 20:00:35 -07:00
nirenjan f0a0a7dcaf Reorganize source layout 2017-07-27 17:56:51 -07:00
nirenjan 7bc0ba522c Use LIBUSB_* values instead of magic numbers 2017-07-27 17:37:58 -07:00
nirenjan 74eeb27ad4 Fix build breakage on Travis-CI
Travis uses an older version of GCC which doesn't seem to support C99
mode by default. This fixes it by moving the variable declarations out
of the for loop and to the beginning of the function.
2017-07-27 17:22:36 -07:00
nirenjan dc352c58da Move build script out of .travis.yml 2017-07-27 17:09:16 -07:00
nirenjan 45c66a4f1a Fix distcheck breakage 2017-07-27 17:05:06 -07:00
nirenjan ea14d1132d Add implementation of stub libusb library
This commit adds the implementation of the stub libusb library in order
to use it in an LD_PRELOAD environment. This also adds the utility
programs to create a device list and sample output to compare against.
2017-07-27 16:43:01 -07:00
nirenjan dc7300db26 Add stub routines for mocking libusb
This is to be used for running automated tests on libx52 and associated
libraries and/or programs
2017-07-26 17:34:29 -07:00
nirenjan 59652c0aff Travis-CI: Compile using both GCC & clang 2017-07-21 22:47:26 -07:00
nirenjan f0e6836195 Upgrade Travis-CI distribution to Trusty 2017-07-21 09:11:36 -07:00
nirenjan 262d125cd4 Refactor util_char_map_gen.py to comply with PEP8 2017-06-14 11:04:53 -07:00
nirenjan 9070d88588 Add mappings for missing characters
Add mappings for Halfwidth kana, CJK ideographics, and some other
missing symbols.

Issue: #6
2017-01-11 11:09:32 -08:00
nirenjan 5c69289cff Add missing file to libx52util_la_SOURCES 2017-01-11 08:34:26 -08:00
nirenjan e053e1ac1c Add support for the X52 (non-Pro model)
This uses the published device IDs for the Saitek X52 (non-Pro) model.
However, based on my knowledge, the X52 uses single color LEDs compared
to the X52 Pro's tri-color LEDs (Red/Amber/Green). For the time being,
until we can determine the actual control messages being sent to the
X52, setting the LED state will not be supported.

This commit also operates on the assumption that the other controls are
the same as the X52 Pro, specifically the following:
- Setting MFD/LED brightness
- Setting MFD text
- Setting blink and shift
- Seting time and date on the MFD clock

Issue: #11
2017-01-10 22:03:13 -08:00
nirenjan 793cd519a2 Add check for X52 vs X52 Pro
This doesn't do anything at the moment, but this should make it easier
to distinguish between the Pro and non-pro models.

Issue: #11
2017-01-10 21:18:26 -08:00
nirenjan 0f7b5e5668 Remove unused members from struct libx52_device 2017-01-10 21:15:14 -08:00
nirenjan 1efd88d770 travis: Make initial build quiet in Travis-CI 2016-12-29 14:09:25 -08:00
nirenjan a7806c43b9 Add new LICENSE file to distribution 2016-12-29 14:08:55 -08:00
nirenjan 8892b3ef7e util: Remove generated file from distribution tarball
util_char_map.c is generated at compile time by the Python script
x52_char_map_gen.py from the configuration x52_char_map.cfg. However,
because it was listed in libx52util_la_SOURCES, it was getting added to
the distribution.

In addition, removing it from the distribution caused `make distcheck`
to fail, since the generation script was called relative to the current
directory, instead of relative to `$(srcdir)`. This commit also fixes
that issue.
2016-12-29 14:01:38 -08:00
nirenjan 56faafca1e Add license clarification and authors file
Closes #12
2016-12-27 13:13:37 -08:00
nirenjan 4532c0d868 Add codepoint translation status chart
This is intended to give the pending codepoints for translation at a
quick glance.
2016-10-08 17:33:19 -07:00
nirenjan c9dd29199d Fix sign-compare warnings 2016-10-08 14:18:56 -07:00
nirenjan 6d8d5a4fd4 Fix return from void function
While gcc on Linux (Travis CI) throws a warning, but otherwise ignores
this return value from void function, clang on OSX throws a fit.
2016-10-08 09:44:44 -07:00
nirenjan 1b9c52ea07 Merge pull request #10 from ryandrake08/master
Clang/OSX cleanups
2016-10-08 09:31:53 -07:00
Ryan Drake ae97d58bd5 Use zero instead of LIBUSB_ERROR_OTHER as default value for rc 2016-10-08 09:22:17 -07:00
nirenjan e5229b6aa2 Clean up enum_conversion warnings on clang/OSX 2016-10-07 22:27:13 -07:00
Ryan Drake aaab4c6b1d Conditionalize use of ELIBACC on __linux__ as it is linux-specific 2016-10-07 19:18:55 -07:00
Ryan Drake 95e933e27c Fix warnings about uninitialized variables 2016-10-06 15:43:32 -07:00
Ryan Drake 15b8abf3c6 Fix warnings about unused variables 2016-10-06 15:28:18 -07:00
Ryan Drake 30622eefa8 Fix control may reach end of non-void function error 2016-10-06 15:19:00 -07:00
nirenjan bbe86d554f Clear up return-type warnings 2016-10-06 10:39:16 -07:00
nirenjan b39c13fe1b x52_cli: Add stdlib.h include to prevent warnings 2016-07-31 12:25:07 -07:00
nirenjan ea2927859b Fix includedir location for headers 2016-05-16 22:15:19 -07:00
nirenjan 710ef00109 Add support for Python3 in parser script 2016-05-06 07:39:02 -07:00
nirenjan 224b08a8e2 Add python to required dependencies 2016-05-05 09:32:00 -07:00
nirenjan bc9001705d Convert character map generator to Python script
The conversion makes it simpler to allow cross-compilation, since we
should be using the host Python interpreter to build the generated
character map, rather than relying on the automake infrastructure.
2016-05-05 09:18:05 -07:00
nirenjan abaa36f35e Add math symbols to character map translation 2015-12-15 08:41:38 -08:00
nirenjan 6528459645 Add Man pages in RONN format 2015-12-14 18:04:26 -08:00
nirenjan db19e4dcae Install headers to includedir 2015-12-13 13:44:32 -08:00
nirenjan 059ec6af1a Make libx52_set_clock return 0 only if fields changed
This is used by an application to check if it needs to call
libx52_update. If libx52_set_clock returns 0, it can be assumed that the
clock did change values that require an update, but any other value
indicates that an update is not required.
2015-12-12 23:11:36 -08:00
nirenjan b0309b1b40 Reduce number of control messages for clock update
Compare the stored clock value against the requested value and only
send the USB vendor control messages if necessary. This should reduce
the number of messages from 5 for every clock update to 1-3, depending
on whether the date has changed or not. Only if the timezone of the
default clock changes should the additional 2 messages for the offset
clocks be sent.
2015-12-11 09:04:54 -08:00
nirenjan 320e3c85dc Allow user to select tests to run 2015-12-11 07:52:35 -08:00
nirenjan ce9f58c15a Add README files to distribution 2015-12-10 22:44:44 -08:00
nirenjan 3849024816 Merge branch 'feature/travis' 2015-12-10 22:14:03 -08:00
nirenjan f0b2e6fecc Add generated objects to .gitignore 2015-12-10 21:56:03 -08:00
nirenjan b18391b3a6 Create the m4 directory to fix the autogen failure 2015-12-10 10:22:59 -08:00
nirenjan 67e6e68fb3 Switch to container based building and update build script 2015-12-10 10:15:43 -08:00