Input device: Difference between revisions

Jump to navigation Jump to search
1,534 bytes removed ,  19 October 2009
No edit summary
Line 358: Line 358:


==Perfiles ya creados fáciles de modificar==
==Perfiles ya creados fáciles de modificar==
===General tips===
===CH Products===
* When testing a new xml file it is best to start FlightGear via a command window (rather than the GUI interface).  Any error messages will then be displayed in the terminal.  Error messages will give both a message and a line number, helping you pinpoint any errors.
* CH Products Eclipse yoke.


* Errors can be detected on initial startup or at runtime.  Both types of errors will be displayed in the terminal.
* Errors can be detected on initial startup or at runtime.  Both types of errors will be displayed in the terminal.
Line 367: Line 367:


These characters will cause problems even if simply included in comments or within scripts.
These characters will cause problems even if simply included in comments or within scripts.
* If your scripts contain any of these characters, you have to enclose the scripts in <script><![CDATA[...]]></script>. Alternatively, you can 'escape' the characters, ie "<" becomes "&lt;".
* Note that as of ver 1.9.1 there appears to be no way to tell FlightGear to reload joystick files at runtime.  So to test any changes to your file you must exit FlightGear and re-start, a somewhat time-consuming process.
* You can find many examples of different ways to program joysticks simply by examining the joystick xml files that are packaged with FlightGear.  See the directory FlightGear/data/input/joysticks
* Many advanced functions can be programmed using the Nasal scripting language.  These scripts are enclosed in <script></script> tags in the XML file. Helpful:
** A guide to the [[Nasal scripting language]] in FlightGear
** [[Nasal FAQ]]
** [[Howto: Write simple scripts in Nasal]]
* You can explore the internal property tree to see many variables that can be altered using joystick buttons or axes (File/Browse Internal Properties)
* You can test bits of Nasal code and do some other useful things using the Nasal Console (Debug/Nasal Console).
* All Nasal code shares a common namespace, so it's possible to set a variable in one nasal binding, and to read it in another.


===Useful hints for scripts===
===Useful hints for scripts===
5,775

edits

Navigation menu