mirror of https://github.com/nirenjan/libx52.git
A missing comma at the end of the STRINGIFY line was causing builds with clang to have segfaults with the default configuration. It turned out that due to the missing comma, the N_("Unknown LED state %d") and N_("off") parameters were getting merged into a single parameter by clang, but interestingly, not by GCC. As a result, when building with clang, the array is "on", "red", "amber", "green" - note the missing "off" at the beginning of the array. This causes clang generated builds to segfault when attemping to log a trace message when configuring LED A (which defaults to green, and the index of LIBX52_LED_STATE_GREEN exceeds the array bounds). |
||
---|---|---|
.. | ||
Makefile.am | ||
README.md | ||
libx52.h | ||
libx52.pc.in | ||
x52_commands.h | ||
x52_common.h | ||
x52_control.c | ||
x52_core.c | ||
x52_date_time.c | ||
x52_mfd_led.c | ||
x52_strerror.c | ||
x52_stringify.c | ||
x52_test_gen.py | ||
x52_tests.json |
README.md
X52 Pro MFD library
This is a library which communicates using libusb-1.0 with the Saitek X52 Pro HOTAS. The library provides several functions to control the LEDs and MFD of the above HOTAS.
Supported functions
- Set the LED state of all LEDs
- Write text to each of the MFD lines
- Set the date/time on the MFD
- Make the clutch and hat LEDs blink
- Display the "SHIFT" indicator in the MFD
Note that when writing text to the MFD, the line length is limited to 16 characters. While you can pass a longer string, the library will only consider the first 16 characters for writing to the display.