display valid target altitudes only
This commit is contained in:
parent
fc5ab53552
commit
c620142778
1 changed files with 5 additions and 3 deletions
|
@ -63,9 +63,11 @@ command interface /autopilot/route-manager/input:
|
||||||
var lon = wp[i].getNode("longitude-deg").getValue();
|
var lon = wp[i].getNode("longitude-deg").getValue();
|
||||||
var lat = wp[i].getNode("latitude-deg").getValue();
|
var lat = wp[i].getNode("latitude-deg").getValue();
|
||||||
var alt = wp[i].getNode("altitude-ft").getValue();
|
var alt = wp[i].getNode("altitude-ft").getValue();
|
||||||
var entry = sprintf("%d: %-5s %3.2f lon %3.2f lat %.0f ft",
|
var entry = sprintf("%d: %-5s %3.2f lon %3.2f lat",
|
||||||
i + 1, id, lon, lat, alt);
|
i + 1, id, lon, lat);
|
||||||
|
if (alt > -9990) {
|
||||||
|
entry ~= sprintf(" %.0f ft", alt);
|
||||||
|
}
|
||||||
list.getChild("value", i, 1).setValue(entry);
|
list.getChild("value", i, 1).setValue(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue