On vendredi 10 octobre 2008, Melchior FRANZ wrote:
> * gerard robin -- Friday 10 October 2008:
> > So from the boolean  value coming from JSBSim   i have to listen it,
> > and to convert with a specific Nasal script , which is tricky.
>
> You are slightly overrating the trickiness factor ...   :-}
>
>   setlistener("/gear/launchbar/state", func(n) {
>       setprop("/fdm/jsbsim/launchbar/launch-bar-state", n.getValue() ==
> "Engaged"); });
>
> But I agree with you. I've never liked the wasteful string
> transmission over MP(!), and I've criticized that before.
> But I don't know if changing the MP property is "allowed".
> I guess we'd also have to change the id number, and leave
> the old one (108) unused.
>
> m.
>
 No overrating at all (rather underrating,  like the economic financial rate 
today :) :)  ) 

My Nasal script is old fashion ( from 2006 )

JBD_op=func{
              if(getprop("/fdm/jsbsim/launchbar/launch-bar-state")== 1){
                setprop("/gear/launchbar/state","Engaged");
                # print("Engaged");
                }else{setprop("/gear/launchbar/state","Disengaged");
                }
}
setlistener("/fdm/jsbsim/launchbar/launch-bar-state",JBD_op);

Cheers

-- 
Gérard
http://pagesperso-orange.fr/GRTux/

J'ai décidé d'être heureux parce que c'est bon pour la santé. 
Voltaire


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to