Re: [Flightgear-devel] controls.nas

2007-11-29 Thread Melchior FRANZ
* Markus Zojer -- Wednesday 21 November 2007:
> I think this snippet of code fits in better in Nasal/controls.nas than 
> my local .nas.

> wingSweep = func { [...]

Committed. (Only did the usual cosmetics, like var, named args, etc.)

m.

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] controls.nas

2007-11-21 Thread Markus Zojer
Hello,
I think this snippet of code fits in better in Nasal/controls.nas than 
my local .nas.
It is analogous to the flaps (except the hard-coded part) control but 
controls the wingsweep.

wingSweep = func {
if(arg[0] == 0) { return; }
if(props.globals.getNode("/sim/wing-sweep") != nil) {
stepProps("/controls/flight/wing-sweep", "/sim/wing-sweep", arg[0]);
return;
}
# Hard-coded wing movement in 5 equal steps:
val = 0.20 * arg[0] + getprop("/controls/flight/wing-sweep");
if(val > 1) { val = 1 } elsif(val < 0) { val = 0 }
setprop("/controls/flight/wing-sweep", val);
}

Fly on,
markus

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel