Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom commands #8

Open
vranki opened this issue Nov 25, 2013 · 1 comment
Open

Add support for custom commands #8

vranki opened this issue Nov 25, 2013 · 1 comment

Comments

@vranki
Copy link
Owner

vranki commented Nov 25, 2013

X-Plane has support for custom commands. Study what kind of protocol is needed to support them and implement it in the code. Should be pretty straightforward.

Example code with custom command:

http://www.xsquawkbox.net/xpsdk/mediawiki/Custom_Command_with_Custom_DataRef

@JDeeth
Copy link

JDeeth commented Nov 28, 2013

I've made a kludgy workaround: a plugin which interfaces datarefs to commands. When set up (hardcoded at the moment) you can write to, for instance, the dataref cmd/baro_up and it will trigger the X-Plane command sim/instruments/barometer_up.

Here's a demo video, using mildly modified versions of the instruments in vranki/ExtPlane-Panel, showing an ExtPlane-Panel interface for Philipp Muenzel's XCIVA inertial nav simulation.

http://www.youtube.com/watch?v=RtuIz3nypJY

(This was a quick hack when I had problems persuading ExtPlane to compile to a working plugin, uploaded here. Native support for commands would be much better!)

Acting on existing X-Plane commands is dead simple. XPLMCommandRef foo = XPLMFindCommandRef( char[] identifier ) to search for the command by name, XPLMCommandBegin( foo ), XPLMCommandEnd( foo ), and/or XPLMCommandOnce( foo ) to operate the command. That's about it! Three functions and an identifier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants