This project provides an interface between Flightgear Flight Simulator and the Saitek Switch Panel. Operation of switch(es) on the Panel is reflected in the simulator.
Executable images are provided for Linux (x86-64) and Windows. The code base is identical for Linux and Windows and is written in Rust.
If you would like to improve the code or automate the Windows installation, please issue a 'pull' request.
This software loads configuration which maps the switch keys to the FSFG simulator properties. The currently available configuration files are located in cessna.xml
, cessna182s.xml
and piper.xml
and are for:
- Cessna 172
- Cessna 182
- Piper PA28-116
It's quite easy to roll-your-own using the Cessna as an example.
This project is the successor to daibach142/FGFS_Saitek_Switch_Panel on GitHub.
This version (1.3.1) revises the license to MIT, and reconfigures the code base (no interface changes)
For problems or issues either enter an issue on Github, or email stksp@attwoods.org.uk.
With many thanks to Bruce Maggs (bmm@cs.duke.edu) for help with debugging.
- Download and expand the software from here.
- Copy
saitekswitch.exe
to a suitable location (Desktop?). - Copy
switchdefaultconfig.xml
to the same directory. - Copy
saitekswitch.nas
to your local FlightGear directory<username>\AppData\Roaming\flightgear.org\Nasal
. - Copy
saitekswitch.xml
to FGFS Protocol directoryProgram Files\Flightgear 2020.3\data\Protocol
. - First run (in Powershell)
.\saitekswitch.exe
& check for any error messages. - Copy
startup.bat
to same location as the program (Desktop?). - If the program
saitekradio.exe
is not present, delete the relevant line instartup.bat
. - Program(s) can now be run by double-click on
startup.bat
.
- Run
sudo make install
in a terminal - Copy
*.xml
to a convenient local directory. - From a directory where
switchdefaultconfg.xml
is located, runsaitekswitch
& check for any error messages.
The default configuration file is switchdefaultconfig.xml
and simply replace its contents with the desired configuration file (cessna.xml
, piper.xml
, or your own). This allows the program to be run without any arguments if desired; it is still possible to specify a config file as an argument if desired.
Note that the Switch Panel software is configured at startup for a
specific aircraft using a configuration file. Files for the Cessna 172P and Piper 28-116 are currently provided, see CONFIGURATION
for roll-your-own.
Add the following start option to FlightGear configuration:
...
--generic=socket,in,20,,60000,udp,saitekswitch
...
Start the simulator first, and wait until initialisation complete. Set the switches suitably on the panel.
To use the default configuration file switchdefaultconfig.xml
,
double-click the startup.bat
file on the Desktop.
Enter the command saitekswitch
or run from the file manager, to use the default file switchdefaultconfig.xml
The software will illuminate the forward landing gear light RED, awaiting a switch change. Operate any switch, and the complete switch settings on the panel will be transferred to the simulator.
On the Piper, the TAXI switch is repurposed to operate the KAP140 Autopilot ACTIVE/STANDBY switch.
On Linux, the default configuration file should be in the directory where you launch the saitekswitch
program.
An optional argument may be used to change to a specific confiuration file e.g.
saitekswitch piper.xml
If you wish to interface to a new aircraft, these instructions may help!
Copy maybe the cessna.xml
file as a base.
There are 13 switch
elements, edit each one to configure the Panel switch to the aircraft configuraation, possibly using the 'properties' window in the simulator. A switch toggles the specified property by sending 1 (on) or 0 (off); this works for FGFS bool, integral or double-precision values. Note that the current switch state is maintained within this driver software, and is not read from the simulator. It is MANDATORY
to provide all 13 elements.
There is one of this, corresponding to the magneto value (0..5) in the simulator. The Magneto Start position also triggers the starter
element on (or off when engaged and moving from the Magneto Start position).
There is one starter
element, which specifies the control to be activated when the Magneto Start position is reached.
In the Piper configuration file, the TAXI switch is unused, and the normal control string is replaced by autopilot engage
. This special case is recognised by the saitekswitch.nas
file, and operates the autopilot engage/disengage for KAP140 on PA28-11x.
Also for any aircraft with a three-way NAV1/NAV2/GPS such the KAP140 on the PA28-11x, using the switch value
instrumentation/nav-source/selector
will cause the switch to select either the NAV1 or GPS settings.