Some quick suggestions:

You wrote:
> interpolate("/controls/gear/brake-left",
>             props.globals.getNode("/controls/gear/brake-left").getValue(),
>             0, 1, 0.1)

Actually, the implementation of interpolate() always starts from the
current value of a property, so in fact there's no need for the first
two arguements.  This call should have the same effect:

  interpolate("/controls/gear/brake-left", <target-value>, 0.1)

And a more general note: the getValue() expression can be more simply
(and efficiantly, for that matter) written as:

  getprop("/controls/gear/brake-left")

The props.Node interface is there for completeness and flexibility,
but grabbing constant strings out of the the property tree is best
done with the simple API.

Andy

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to