Latest commit
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
*** ExtPlane *** X-Plane plugin that allows commanding X-Plane from external programs using TCP protocol. Known users: ExtPlane-Panel - a panel application @ https://github.com/vranki/ExtPlane-Panel GNU GPL, (c) Ville Ranki (ville.ranki@iki.fi) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Common build requirements * Copy X-Plane SDK to home directory, so that the headers can be found at ~/SDK/CHeaders/XPLM (or edit the .pro file). You'll need Qt development libraries installed. * To build on Linux * $ qmake $ make copy libextplane-plugin.so.1.0.0 to X-Plane/Resources/plugins/extplane.xpl * To build on Mac * $ qmake $ make copy libextplane-plugin.1.0.0.dylib to X-Plane/Resources/plugins/extplane.xpl Warning! If you see any error or warning like : ld: in /opt/local/lib/libxslt.1.dylib, file was built for unsupported file format which is not the architecture being linked (i386) You need to rebuild libxslt with the +universal variant on MacPort otherwise the plugin cannot be loaded by X-Plane ! You should get the same for qt4-mac also. * To test * Launch X-Plane in console and observe the output. You should see something like: TcpServer::TcpServer(QObject*, DataRefProvider*) Listening on port 51000 Open another console and run 'telnet localhost 51000' When connected, try typing the following commands: sub sim/cockpit/electrical/night_vision_on set sim/cockpit/electrical/night_vision_on 1 set sim/cockpit/electrical/night_vision_on 0 sub sim/flightmodel/position/local_y 100 set sim/flightmodel/position/local_y 3000 key 0 key 0 disconnect * Command reference * Datarefs: sub <dataref> [accuracy] - Subscribe to dataref, with optional accuracy. unsub <dataref> - Unsubscribe dataref. set <dataref> <value> - Set dataref to value. Dataref must be subscribed first. With accuracy you can decide how much the dataref's value can change before a update is sent. Set it to as large value as possible to maximize frame rate and minimize network traffic. List of datarefs can be found at: http://www.xsquawkbox.net/xpsdk/docs/DataRefs.txt Keys and buttons: key <key id> - Create a command key press. but <button id> - Press down an button. rel <button id> - Release button pressed using "but" command. List of key and button id's can be found at: http://www.xsquawkbox.net/xpsdk/mediawiki/XPLMUtilities Note that the key and button id's are numbers, not names. X-Plane does not provide a way to lookup keys or buttons by name. Other: disconnect - Disconnect. * Plugin output * EXTPLANE <version> - Sent when connected. Version number is currently 1. u<type> <dataref> <value> - Update of dataref ExtPlane plugin outputs some log to stdout, so if you have problems with the plugin, start X-Plane in console and read the output. * Features * - Multiple concurrent connections - Set and get datarefs - Dataref types: int, float and double - Simulate key and button presses ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Comments and bug reports to ville.ranki@iki.fi Official git repo at https://github.com/vranki/ExtPlane