Merge branch 'master' of gitorious.org:fg/fgdata
This commit is contained in:
commit
9ad18ed54a
1 changed files with 21 additions and 20 deletions
|
@ -9,26 +9,27 @@
|
||||||
var gps = props.globals.getNode("/instrumentation/gps/", 1);
|
var gps = props.globals.getNode("/instrumentation/gps/", 1);
|
||||||
var dlg = props.globals.getNode("/sim/gui/dialogs/gps", 1);
|
var dlg = props.globals.getNode("/sim/gui/dialogs/gps", 1);
|
||||||
var cmd = gps.getNode("command", 1);
|
var cmd = gps.getNode("command", 1);
|
||||||
|
|
||||||
var scratch = gps.getNode("scratch", 1);
|
var scratch = gps.getNode("scratch", 1);
|
||||||
var scratchValid = scratch.getNode("valid", 1);
|
var scratchValid = dlg.getNode("scratch/valid", 1);
|
||||||
var searchIsWaypoints = 0;
|
var searchIsWaypoints = 0;
|
||||||
var anySpec = 'vor,airport,heliport,ils,seaport,fix,ndb,waypoint,tacan,city,town';
|
var anySpec = 'vor,airport,heliport,ils,seaport,fix,ndb,waypoint,tacan,city,town';
|
||||||
|
|
||||||
var updateSearchResults = func(isWpts, index = 0)
|
var updateSearchResults = func(isWpts, index = 0)
|
||||||
{
|
{
|
||||||
searchIsWaypoints = isWpts;
|
searchIsWaypoints = isWpts;
|
||||||
dlg.getNode("scratch-index", 1).setValue(index);
|
dlg.getNode("scratch-index", 1).setValue(index);
|
||||||
|
|
||||||
var lastIndex = size(searchResults) - 1;
|
var lastIndex = size(searchResults) - 1;
|
||||||
dlg.getNode("scratch-has-next", 1).setValue((index + 1) < lastIndex);
|
dlg.getNode("scratch-has-next", 1).setValue((index + 1) < lastIndex);
|
||||||
|
|
||||||
if (size(searchResults) < 1) {
|
if (size(searchResults) < 1) {
|
||||||
scratchValid.setBoolValue(0);
|
scratchValid.setBoolValue(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateScratch();
|
updateScratch();
|
||||||
}
|
}
|
||||||
|
|
||||||
var updateScratch = func
|
var updateScratch = func
|
||||||
{
|
{
|
||||||
|
@ -64,8 +65,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
scratch.getNode("mag-bearing-deg", 1).setValue(cd[0] + magvar());
|
dlg.getNode("scratch-mag-bearing-deg", 1).setValue(cd[0] + magvar());
|
||||||
scratch.getNode("distance-nm", 1).setValue(cd[1]);
|
dlg.getNode("scratch-distance-nm", 1).setValue(cd[1]);
|
||||||
|
|
||||||
gui.dialog_update("gps");
|
gui.dialog_update("gps");
|
||||||
}
|
}
|
||||||
|
@ -484,7 +485,7 @@
|
||||||
<vrule/>
|
<vrule/>
|
||||||
<group>
|
<group>
|
||||||
<visible>
|
<visible>
|
||||||
<property>/instrumentation/gps/scratch/valid</property>
|
<property>/sim/gui/dialogs/gps/scratch/valid</property>
|
||||||
</visible>
|
</visible>
|
||||||
<layout>table</layout>
|
<layout>table</layout>
|
||||||
<text>
|
<text>
|
||||||
|
@ -534,7 +535,7 @@
|
||||||
<col>0</col>
|
<col>0</col>
|
||||||
<label>MMMMMM</label>
|
<label>MMMMMM</label>
|
||||||
<format>Bearing: %3.0f</format>
|
<format>Bearing: %3.0f</format>
|
||||||
<property>/instrumentation/gps/scratch/mag-bearing-deg</property>
|
<property>/sim/gui/dialogs/gps/scratch-mag-bearing-deg</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
<text>
|
<text>
|
||||||
|
@ -542,7 +543,7 @@
|
||||||
<col>1</col>
|
<col>1</col>
|
||||||
<label>MMMMMM</label>
|
<label>MMMMMM</label>
|
||||||
<format>Distance: %5.1fnm</format>
|
<format>Distance: %5.1fnm</format>
|
||||||
<property>/instrumentation/gps/scratch/distance-nm</property>
|
<property>/sim/gui/dialogs/gps/scratch-distance-nm</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</text>
|
</text>
|
||||||
<!-- navaid info -->
|
<!-- navaid info -->
|
||||||
|
|
Loading…
Reference in a new issue