Skip to content

Latest commit

 

History

History
112 lines (81 loc) · 6.22 KB

README.md

File metadata and controls

112 lines (81 loc) · 6.22 KB

XPanel

Detailed description and configuration options can be found here

XPanel is a plugin for X-Plane >=11 flight simulator. If you have or plan to build a home cockpit then it is good to check this. It can connect your USB HID hardware devices to the X-Plane system.

It has a configuration file where you can define the logical connections between hardware elements (buttons, switches, displays, etc) and the internal datarefs and commands of X-Plane.

Currently, it supports these types of USB-HID devices:

Device URL Description
MultiPanel Saitek Multi Panel This is a device that mainly contains the buttons associated with the autopilot functions
RadioPanel Saitek Radio Panel Device to control radio functions of your airplane
SwitchPanel Saitek Switch Panel Device with switches to control the electrical systems of your plane
FIP Logitech/Saitek Flight Instrument Panel Device with a graphical screen to display aircraft instruments (supported only on Windows)
TRC100 TRC-1000 PFD/MFD & Audio Panel These devices are replica of Garmin G1000 cockpit panels
Custom USB HID devices Custom USB HID Devices You can use a custom USB HID device like Arduino Leonardo board

Install

Windows

Get the latest release from github

Copy the xpanel folder into your X-Plane plugin directory (in my case it is c:\XPlane12\resources\plugins).

Please don't forget to remove any other plugins that want to connect to your USB Hid devices in the home cockpit.

The aircraft-specific configuration file (xpanel.ini) shall be put into the aircraft folder.

If you have any errors during the plugin load or run please check the main X-Plane log file. If you want more detailed logs from the plugin, please set the log level to DEBUG or even TRACE. See the details at troubleshooting

Linux

Get the latest release from github Copy the xpanel folder into your X-Plane plugin directory.

udev rules

You need to add the appropriate udev rules to grant access permissions for the devices

For the Saitek devices you need to set udev rules like this:

/etc/udev/rules.d/99-saitek.rules

KERNEL=="hidraw*", ATTRS{idProduct}=="0d67", ATTRS{idVendor}=="06a3", MODE="0666", SYMLINK+="saitekswitchpanel"
KERNEL=="hidraw*", ATTRS{idProduct}=="0d05", ATTRS{idVendor}=="06a3", MODE="0666", SYMLINK+="saitekradiopanel"
KERNEL=="hidraw*", ATTRS{idProduct}=="0d06", ATTRS{idVendor}=="06a3", MODE="0666", SYMLINK+="saitekmultipanel"
BUS=="usb", ATTRS{idProduct}=="0d05", ATTRS{idVendor}=="06a3", MODE="0666"
BUS=="usb", ATTRS{idProduct}=="0d06", ATTRS{idVendor}=="06a3", MODE="0666"
BUS=="usb", ATTRS{idProduct}=="0d67", ATTRS{idVendor}=="06a3", MODE="0666"

If you have an Arduino based board, please add this rule:

/etc/udev/rules.d/99-leonardo.rules:

KERNEL=="hidraw*", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="8036", MODE:="0666", SYMLINK+="arduinoleonardo"
BUS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="8036", MODE="0666"

After setting the above rules, please don't forget to reload them

udevadm control --reload

Build

Windows

Check out the latest source file from github

Open the solution file (XPanel.sln) with Visual Studio. Select either Release or Debug build configuration. The solution file contains two projects. One for the xpanel plugin and one for the unit tests.

The build artifact of the plugin is generated in the Release|Debug/plugin/xpanel folder (win.xpl file)

You can also use cmake to build the plugin on Windows

Run unit tests

To run the unit tests, open the Visual Studio test menu and select Test Explorer. Push the run-all button and check the test results.

Linux

Check out the latest source file from github

Dependencies:

  • C++ toolchain
  • CMake
  • pkg-config
  • libudev
  • Lua
$ cmake --install-prefix /tmp/xpanel-install -S . -B build
$ cmake --build build
$ cmake --install build

macOS

Dependencies:

brew install lua
brew install pkg-config

Copy or link the /tmp/xpanel-install/XPanel directory into the X-Plane plugin folder.

Report bugs

If you find any bug in the plugin or need help please open a new bug report at github Please always attach the X-Plane log file and make sure you set the highest log level (TRACE) in the plugin config file. Also attach your plugin configuration file as well.