Vance Souders wrote:
I'm working on a new cockpit for the T6; the T6's altimeter displays
barometric pressure in both inches HG and MB. I want to add a small
amount of script that converts from the HG reading in the property tree
to MB for the gauge (I need this for the texture translation). After
looking at the docs, it's not clear to me where this code should
reside. Can I put script code directly in the gauge's XML file (I've
tried this and it doesn't seem to work)?
Actually, the instrument definitions themselves cannot yet contain
Nasal statements, at least that's what I learnt about 3 weeks ago
when I made a quick stab at another new instrument, I was also somewhat
surprised but found my assumptions confirmed when I looked into the
source code - so, in that regard FG is currently somehwat inconsistent,
because it doesn't seem to support Nasal scripts in any PropertyList
file.
As a workaround you could simply place that script into a separate
nasal module and put that into the Nasal sub folder, so that it gets
automatically loaded - you can then refer to the code in that module
by using the file's name (without extension) to access
functions/objects.
For debugging purposes it might be helpful to use "print" statements
in order to see whether a function is actually called.
---------
Boris
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d