Prior to this change, there was a lot of duplicated code within the dump routines, which would call out to a common `print_section` routine that had global state. This causes problems from a multi-threaded perspective in that multiple calls to `x52d_config_save_file` were not MT-safe. In addition, the dump logic was written such that it could only be used in the config dump. It is desired that we add functionality to return the formatted config value as a string in a different part of the code as well. This change brings in the shared state into a stack variable, and changes the dump functions to return a const char *, thereby allowing for greater reuse, as well as getting rid of the shared state. However, there is still a little bit of shared state in the `int_dumper` routine. This can be ignored for now, but we should possibly figure out how to get rid of the shared state altogether. |
||
---|---|---|
.github | ||
bugreport | ||
cli | ||
daemon | ||
docs | ||
evtest | ||
joytest | ||
kernel_module | ||
lib | ||
libusbx52 | ||
libx52 | ||
libx52io | ||
libx52util | ||
m4 | ||
po | ||
udev | ||
.gitignore | ||
AUTHORS | ||
CONTRIBUTING.md | ||
ChangeLog.md | ||
Doxyfile.in | ||
DoxygenLayout.xml | ||
INSTALL.md | ||
LICENSE | ||
Makefile.am | ||
README.md | ||
Version | ||
autogen.sh | ||
configure.ac | ||
configure.version | ||
gettext.h | ||
usb-ids.h |
README.md
Saitek X52Pro joystick driver for Linux
This project adds a new driver for the Saitek/MadCatz X52 Pro flight control system. The X52 pro is a HOTAS (hand on throttle and stick) with 7 axes, 39 buttons, 1 hat and 1 thumbstick and a multi-function display which is programmable.
Currently, only Windows drivers are available from Saitek PLC, which led me to develop a new Linux driver which can program the MFD and the individual LEDs on the joystick. The standard usbhid driver is capable of reading the joystick, but it cannot control the MFD or LEDs.
Most of the extra functionality can be handled from userspace. See the individual folders for README information.
Note: This repository currently only provides commandline interfaces to control the MFD and LEDs. If you are not comfortable working in the commandline, then the gx52 project might be a better fit for your needs as it provides a graphical interface to control the MFD and LEDs.
Installing released versions
Beginning from version v0.2.3, prebuilt packages are available on Ubuntu PPA and the Arch User Repository.
Ubuntu
This project has been released as a PPA on Ubuntu. To install the package, run the following commands in the terminal.
sudo apt-add-repository ppa:nirenjan/libx52
sudo apt update
sudo apt install libx52-1
Arch Linux
This is available on the AUR
Building and installing from source
See INSTALL.md