x52pro-linux
0.2.1
Saitek X52/X52Pro drivers for Linux/Unix
|
x52cli - Command line interface to libx52
x52cli commands [command-options]
x52cli is a command line interface to the X52 library that allows you to set the LEDs and different parameters on the multifunction display (MFD).
Running x52cli without any arguments will display a brief help message.
Commands are not case sensitive.
bri { mfd | led } < brightness >
mfd < line > < text >
0
, 1
or 2
, and refers to the first, second or third line of the multifunction display respectively. text cannot have embedded NUL characters (0x00) and must correspond with the character map fo the MFD. text should be quoted in order to preserve embedded whitespace. To pass raw hex values, use printf(1) as shown in the EXAMPLES section. Note that text is limited to a length of 16 characters. While you can pass in longer strings, they will be silenty truncated.led < led-id > < state >
blink { on | off }
shift { on | off }
clock { local | gmt } { 12hr | 24hr } { ddmmyy | mmddyy | yymmdd }
offset { 2 | 3 } < offset-val > { 12hr | 24hr }
time < hour > < minute > { 12hr | 24hr }
date <dd > <mm > <yy> { ddmmyy | mmddyy | yymmdd }
raw < wIndex > < wValue >
This is the list of LED IDs and corresponding states supported by the X52 Pro. Note that the on state is only allowed for the fire and throttle LEDs, and they do not support the red, amber and green states. The remaining LEDs do not support the on state, but support all the other states.
x52cli does not maintain any state between invocations. As a result the clock command will reset the relative offsets for clocks 2 and 3 back to 0 and configure them to be in 12 hour mode. To work around this, use the date and time commands instead to manually configure the date and time.
You must have write permissions to the USB device in order to use the libx52 library, and by extension, x52cli.
The simplest method to obtain such permissions is to run x52cli as root, possibly through sudo(8)
x52cli led t1 off
x52cli led B amber
x52cli mfd 0 "Hello World"
x52cli mfd 1 "$(printf '\\x9FC\\xE2mo Est\\xE0s?')"