Warning
EXPERIMENTAL / WORK IN PROGRESS
This driver is still under active testing. It interacts directly with USB HID and vendor-specific endpoints and may crash your system, lock up USB devices, or require a hard reboot.
Use at your own risk.
xpad_flydigi is a fork of the Linux xpad driver that exposes Flydigi’s vendor-specific output interface while keeping normal controller input fully functional.
It lets you send raw command bytes directly to Flydigi controllers without losing button or axis input, enabling things like real-time trigger mode switchin and in-game trigger mods.
This makes it suitable for game mods that need control over Flydigi-specific features that are not supported by the upstream xpad driver.
sudo git clone https://github.com/RezenDeveloper/xpad_flydigi /usr/src/xpad_flydigi-0.1
sudo dkms install -m xpad_flydigi -v 0.1Since both xpad and xpad_flydigi cannot attach to the same USB device simultaneously, you need to block xpad from binding to your Flydigi controller.
sudo tee /etc/modprobe.d/blacklist-xpad.conf <<'EOF'
blacklist xpad
EOFUpdate the initramfs to apply the blacklist:
# mkinitcpio (for Arch-based systems) or equivalent initramfs tool
sudo mkinitcpio -P
sudo systemctl restart systemd-modules-load.servicexpad_flydigi retains the core functionality of xpad, so other devices that normally use xpad will continue to work.
cd /usr/src/xpad_flydigi-0.1
sudo git fetch
sudo git checkout origin/master
sudo dkms remove -m xpad_flydigi -v 0.1 --all
sudo dkms install -m xpad_flydigi -v 0.1
sudo dkms remove -m xpad_flydigi -v 0.1 --all
sudo rm -rf /usr/src/xpad_flydigi-0.1
After installing and connecting your controller, xpad_flydigi will create new control files inside the USB device directory.
You can locate them with:
sudo find /sys/devices -name "flydigi_*" -type fThis file is used to configure trigger behavior on Flydigi controllers. It mirrors the behavior of the Flydigi Space Station application by sending the same command structure and respecting the same value ranges.
Values sent outside the documented ranges are automatically clamped to safe limits.
echo "0 1 10 30 0 0 0" | sudo tee /sys/bus/usb/devices/1-4:1.0/flydigi_trigger > /dev/nullthis file expects a 7-value payload using this format
<side> <mode> <p1> <p2> <p3> <p4> <p5>The file expects 7 integer values, separated by spaces:
- side (0-1)
- 0 = left trigger.
- 1 = right trigger.
- mode (0-5)
- Trigger behavior mode:
| value | mode |
|---|---|
| 0 | Default |
| 1 | Race Mode |
| 2 | Recoil Mode |
| 3 | Sniper Mode |
| 4 | Lock Mode |
| 5 | Vibration Mode |
Each mode uses a different subset of parameters.
Unused parameters are ignored and automatically set to 0.
No parameters. All values are ignored and reset to default behavior.
| Parameter | Description | Range |
|---|---|---|
| p1 | Initial trigger position | 0–192 |
| p2 | Trigger pressure | 1–255 |
| Parameter | Description | Range |
|---|---|---|
| p1 | Vibration start position | 0–192 |
| p2 | Initial recoil strength | 1-255 |
| p3 | Recoil intensity once start position is reached | 1-255 |
| p4 | Recoil frequency | 1-255 |
| p5 | Only report trigger input after start position (0 = false, 1 = true) |
0-1 |
| Parameter | Description | Range |
|---|---|---|
| p1 | Initial trigger position | 0-192 |
| p2 | Trigger length | 1-255 |
| p3 | Trigger pressure | 1-255 |
| p4 | Only report trigger input after start position (0 = false, 1 = true) |
0-1 |
| Parameter | Description | Range |
|---|---|---|
| p1 | Lock start position | 0–192 |
| Parameter | Description | Range |
|---|---|---|
| p1 | Vibration intensity | 0-200 |
| p2 | Vibration threshold (below this value no vibration occurs) | 1-255 |
| p3 | Trigger travel range for sustained vibration feedback | 1-200 |
| p4 | Vibration frequency | 1-200 |
This file sends raw 15-byte packets directly to the controller, bypassing all validation, filtering, and safety checks.
Caution
This interface can cause undefined behavior, firmware lockups, or permanent device damage. Only use this if you fully understand the Flydigi protocol.
printf '\xa5\x30\x06\x01\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | sudo tee /sys/bus/usb/devices/1-4:1.0/flydigi_raw > /dev/nullCheck /reference folder to see packets references from Flydigi Space Station
THIS SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGE TO HARDWARE, FIRMWARE, OR ACCESSORIES CAUSED BY USING THIS DRIVER.