On 20 Sep 2012, at 10:30, James Turner wrote:
> I think I should go the full way here, and make a NasalMetar object that can
> be initialised as a location, and fires a Nasal callback when its data
> changes, i.e when it loads. We have all the pieces for this already, and
> glueing them together in this way would allow lots of interesting FMS and
> other features.
I didn't make a Nasal metar-wrapper, because Torsten Dreyer already provided
90% of what was needed with the MetarProperties object. What I have done, is
slightly tweaked the API, so you can request metar to be exposed at any place
in the property tree, via a new command.
(from nasal):
fgcommand("request-metar", var n = props.Node.new({ "path":
"/foo/mymetar", "station":"LOWI"}));
If you pass an existing path, the station ID will be updated, and if you pass
the same station ID as before, no additional request is made. As usual for
metar-properties, there's a time-to-live and valid flags you can check, and the
metar refreshes automatically every 900 seconds. You can also write to the
station ID directly to change station, update the time-to-live, and wait for
the valid signal.
There's also an unregister command ('clear-metar') to cancel the binding into
the property tree.
Feedback welcome as always!
James
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel