* Bill Galbraith -- Thursday 25 January 2007:
> or do I have to live with the definitions that come from
> the joystick xml files?
You have to live with them *somewhere* in that aircraft's files,
but you don't have to put them into the FDM config file. Instead
you could write a few lines of Nasal that copy the properties,
and put those lines into the *-set.xml file. For example:
<nasal>
<genhel>
var in0 = props.globals.getNode("/controls/flight/aileron", 1);
var in1 = props.globals.getNode("/controls/flight/elevator", 1);
var in2 = props.globals.getNode("/controls/flight/throttle", 1);
var out0 = props.globals.getNode("/controls/flight/cyclic-lat", 1);
var out1 = props.globals.getNode("/controls/flight/cyclic-lon", 1);
var out2 = props.globals.getNode("/controls/flight/collective", 1);
func copy_controls = func {
out0.setDoubleValue(in0.getValue();
out1.setDoubleValue(in1.getValue();
out2.setDoubleValue(in2.getValue();
settimer(copy_controls, 0);
}
copy_controls();
</genhel>
</nasal>
You could also use listeners for that purpose, although that doesn't
really have any advantages. A lot of code only to avoid those
*horrible* plane properties. :-}
m.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users