20,741
edits
m (this lacks quite a number of fgcommands ...) |
No edit summary |
||
Line 165: | Line 165: | ||
<value>3</value> | <value>3</value> | ||
</binding> | </binding> | ||
===request-metar === | |||
{{cquote| | |||
<syntaxhighlight lang="php"> | |||
fgcommand("request-metar", var n = props.Node.new({ "path": "/foo/mymetar", "station":"LOWI"})); | |||
</syntaxhighlight> | |||
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.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg38372.html|title=<nowiki>[Flightgear-devel] Requesting arbitrary metar</nowiki>|author=James Turner|date=Sun, 23 Sep 2012 08:56:48 -0700}}</ref>|James Turner}} | |||
<references/> | |||
== Related content == | == Related content == |