From ee549e6524f25fd56dded435674b4535c76cf316 Mon Sep 17 00:00:00 2001 From: BARANGER Emmanuel Date: Sun, 10 Oct 2010 21:37:11 +0200 Subject: [PATCH 01/15] Merge branch 'master' of git://gitorious.org/fg/fgdata From 87688ddf6a34ca907f840f442965f1dea88a08cf Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 11 Oct 2010 10:52:21 +0100 Subject: [PATCH 02/15] Thorsten Brehm: fix position-in-air dialog when a parking position was previously specified. --- gui/dialogs/location-in-air.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/dialogs/location-in-air.xml b/gui/dialogs/location-in-air.xml index 63e104414..4e2fa953a 100644 --- a/gui/dialogs/location-in-air.xml +++ b/gui/dialogs/location-in-air.xml @@ -260,6 +260,8 @@ nasal - - + + 75 + 25 + -180 + 180 + /ai/models/wingman/controls/break-deg-rel + + dialog-apply + + + nasal + + + left - + - + @@ -156,15 +156,8 @@ - - - - - - - hbox @@ -182,6 +175,26 @@ + + hbox + + + left + + + + + + + true From 37e42d60b042ecbf693a333982dbbb2e97279cea Mon Sep 17 00:00:00 2001 From: Vivian Meazza Date: Tue, 12 Oct 2010 23:17:35 +0100 Subject: [PATCH 10/15] Add model cockpit view dialog. Signed-off-by: Vivian Meazza --- gui/dialogs/model-cockpit-view.xml | 90 ++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 gui/dialogs/model-cockpit-view.xml diff --git a/gui/dialogs/model-cockpit-view.xml b/gui/dialogs/model-cockpit-view.xml new file mode 100644 index 000000000..be118d10b --- /dev/null +++ b/gui/dialogs/model-cockpit-view.xml @@ -0,0 +1,90 @@ + + + + model-cockpit-view + 5 + 3 + hbox + 0 + + + false + 0 + 0 + 0 + 0 + + + + + + + + 6 + + + + 0 + 1 + /sim/current-view/model-cockpit-view + + 1 + 1 + 1 + 1 + + + HELVETICA_14 + + + + + From 755a6a4d1abd48f80ac03bf0d12c1ec68f74cd7c Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Wed, 13 Oct 2010 08:14:20 +0200 Subject: [PATCH 11/15] Remove reference to inexistant texture --- Effects/water.eff | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/Effects/water.eff b/Effects/water.eff index 248950cb6..94a6cff6c 100644 --- a/Effects/water.eff +++ b/Effects/water.eff @@ -10,13 +10,6 @@ repeat normalized - - Textures/Water/water-refraction.png - linear-mipmap-linear - repeat - repeat - normalized - Textures/Water/water-normalmap.png linear-mipmap-linear @@ -84,16 +77,6 @@ texture[0]/internal-format - - 1 - texture[1]/image - texture[1]/filter - texture[1]/wrap-s - texture[1]/wrap-t - - texture[1]/internal-format - - 2 texture[2]/image @@ -124,11 +107,6 @@ 0 - water_refraction - sampler-2d - 1 - - water_normalmap sampler-2d 2 From e7e8ac84f257b6e728e259d88453ab4f6001abd8 Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Wed, 13 Oct 2010 20:46:31 +0200 Subject: [PATCH 12/15] don't use printlog before nasal-dir-initialized Thanks, Anders. --- Nasal/contrail.nas | 2 +- Nasal/seaport.nas | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Nasal/contrail.nas b/Nasal/contrail.nas index 3ae2fcb41..c9e93572c 100644 --- a/Nasal/contrail.nas +++ b/Nasal/contrail.nas @@ -26,8 +26,8 @@ updateContrail = func{ ### Contrail -printlog ("debug", "init contrail"); _setlistener("/sim/signals/nasal-dir-initialized", func { + printlog ("debug", "init contrail"); props.globals.initNode("environment/pressure-inhg", 1, "DOUBLE"); props.globals.initNode("environment/temperature-degc", 1, "DOUBLE"); props.globals.initNode("environment/contrail", 1, "BOOL"); diff --git a/Nasal/seaport.nas b/Nasal/seaport.nas index f496b6ecb..81786fd55 100644 --- a/Nasal/seaport.nas +++ b/Nasal/seaport.nas @@ -1,11 +1,13 @@ -_setlistener("/sim/presets/latitude-deg", func { - printlog("info", "*** NEW LOCATION ***"); - settimer(func { - var typ = getprop("/sim/type"); - var lat = getprop("/position/latitude-deg"); - var lon = getprop("/position/longitude-deg"); - var g = geodinfo(lat, lon); - if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") ) - fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" })); - }, 8); -}, 1); +_setlistener("/sim/signals/nasal-dir-initialized", func { + _setlistener("/sim/presets/latitude-deg", func { + printlog("info", "*** NEW LOCATION ***"); + settimer(func { + var typ = getprop("/sim/type"); + var lat = getprop("/position/latitude-deg"); + var lon = getprop("/position/longitude-deg"); + var g = geodinfo(lat, lon); + if ((g != nil and g[1] != nil and g[1].solid) and (typ == "seaplane") ) + fgcommand("dialog-show", props.Node.new({ "dialog-name": "seaport" })); + }, 8); + }, 1); +}); From 0425ec0589773fdea43f764cfc6e82bf682929a9 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 16 Oct 2010 17:31:19 +0100 Subject: [PATCH 13/15] Torsten Brehm: catch NaNs in pilot list gui, and report only once per call-sign. --- Nasal/multiplayer.nas | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/Nasal/multiplayer.nas b/Nasal/multiplayer.nas index f2843b0c6..a47838225 100644 --- a/Nasal/multiplayer.nas +++ b/Nasal/multiplayer.nas @@ -178,6 +178,7 @@ var dialog = { { type: "checkbox", property: "controls/invisible", callback: "multiplayer.dialog.toggle_ignore", argprop: "callsign", label: "---------", halign: "right", font: font }, ]; + me.cs_warnings = {}; me.name = "who-is-online"; me.dialog = nil; me.loopid = 0; @@ -275,20 +276,29 @@ var dialog = { var ac = geo.Coord.new().set_xyz(x, y, z); var distance = nil; call(func distance = self.distance_to(ac), nil, var err = []); - if (size(err)) { - # debug.printerror(err); - # debug.dump(self, ac, mp); - # debug.tree(mp.node); + if ((size(err))or(distance==nil)) { + # Oops, have errors. Bogus position data (and distance==nil). + if (me.cs_warnings[mp.callsign]!=1) { + # report each callsign once only (avoid cluttering) + me.cs_warnings[mp.callsign] = 1; + print("Received invalid position data: " ~ debug._error(mp.callsign)); + } + # debug.printerror(err); + # debug.dump(self, ac, mp); + # debug.tree(mp.node); + } + else + { + # Node with valid position data (and "distance!=nil"). + n.setValues({ + "model-short": mp.available ? mp.model : "[" ~ mp.model ~ "]", + "bearing-to": self.course_to(ac), + "distance-to-km": distance / 1000.0, + "distance-to-nm": distance * M2NM, + "position/altitude-m": n.getNode("position/altitude-ft").getValue() * FT2M, + "controls/invisible": contains(ignore, mp.callsign), + }); } - - n.setValues({ - "model-short": mp.available ? mp.model : "[" ~ mp.model ~ "]", - "bearing-to": self.course_to(ac), - "distance-to-km": distance / 1000.0, - "distance-to-nm": distance * M2NM, - "position/altitude-m": n.getNode("position/altitude-ft").getValue() * FT2M, - "controls/invisible": contains(ignore, mp.callsign), - }); } if (PILOTSDLG_RUNNING) settimer(func me.update(id), 1, 1); From 81f756781ba4699a777bdbb6b30b2ca05cff9cd2 Mon Sep 17 00:00:00 2001 From: BARANGER Emmanuel Date: Sun, 17 Oct 2010 00:02:00 +0200 Subject: [PATCH 14/15] Merge branch 'master' of git://gitorious.org/fg/fgdata From e6b959b9c8673f8afc985fcf858fa414ff952dcb Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 20 Oct 2010 11:20:05 +0100 Subject: [PATCH 15/15] Updated route-manager dialog, for revised C++ parts. --- gui/dialogs/route-manager.xml | 143 ++++++++++++++++++++++++++++++++-- 1 file changed, 138 insertions(+), 5 deletions(-) diff --git a/gui/dialogs/route-manager.xml b/gui/dialogs/route-manager.xml index f5449f121..f0ad2d1ca 100644 --- a/gui/dialogs/route-manager.xml +++ b/gui/dialogs/route-manager.xml @@ -30,6 +30,8 @@ command interface /autopilot/route-manager/input: var list = cmdarg().getNode("list"); var cmd = routem.getNode("input", 1); var route = routem.getNode("route", 1); + var dep = routem.getNode("departure", 1); + var dest = routem.getNode("destination", 1); var sel_index = func { return int(selection.getValue()); @@ -59,8 +61,8 @@ command interface /autopilot/route-manager/input: cmd.setValue("@delete" ~ sel_index()); } - var auto_route = func { - cmd.setValue(); + var route = func { + cmd.setValue("@route" ~ sel_index()); } var jump_to = func { @@ -88,10 +90,15 @@ command interface /autopilot/route-manager/input: var departureRunways = dlg.getNode("departure-runways", 1); var destRunways = dlg.getNode("destination-runways", 1); - + var sids = dlg.getNode("sids", 1); + var stars = dlg.getNode("stars", 1); + var updateRunways = func { - var depIcao = routem.getNode("departure").getNode("airport").getValue(); + var depIcao = dep.getNode("airport").getValue(); departureRunways.removeChildren("value"); + + var currentRunway = dep.getNode("runway").getValue(); + var foundCurrent = 0; var apt = airportinfo(depIcao); if (apt != nil) { @@ -99,11 +106,20 @@ command interface /autopilot/route-manager/input: foreach (var rwy; keys(apt.runways)) { departureRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy); i += 1; + if (rwy == currentRunway) { + foundCurrent = 1; + } } } - var destIcao = routem.getNode("destination").getNode("airport").getValue(); + if (!foundCurrent) { + dep.getNode("runway").clearValue(); + } + + var destIcao = dest.getNode("airport").getValue(); destRunways.removeChildren("value"); + currentRunway = dest.getNode("runway").getValue(); + foundCurrent = 0; var apt = airportinfo(destIcao); if (apt != nil) { @@ -111,11 +127,68 @@ command interface /autopilot/route-manager/input: foreach (var rwy; keys(apt.runways)) { destRunways.getNode("value[" ~ i ~ "]", 1).setValue(rwy); i += 1; + if (rwy == currentRunway) { + foundCurrent = 1; + } } } + if (!foundCurrent) { + dest.getNode("runway").clearValue(); + } + + print("updated runways"); gui.dialog_update("route-manager"); } + + var updateSIDs = func { + sids.removeChildren("value"); + var depIcao = dep.getNode("airport").getValue(); + var rwy = dep.getNode("runway").getValue(); + var apt = airportinfo(depIcao); + if (apt == nil or apt.runways[rwy] == nil) { + dep.getNode("sid").clearValue(); + gui.dialog_update("route-manager", "sid"); + return; + } + + sids.getNode("value[0]", 1).setValue("(none)"); + var i=1; + foreach (var s; apt.runways[rwy].sids) { + sids.getNode("value[" ~ i ~ "]", 1).setValue(s); + i += 1; + } + + gui.dialog_update("route-manager", "sid"); + } + + var updateSTARs = func { + stars.removeChildren("value"); + var icao = dest.getNode("airport").getValue(); + var rwy = dest.getNode("runway").getValue(); + var apt = airportinfo(icao); + if (apt == nil or apt.runways[rwy] == nil) { + dest.getNode("star").clearValue(); + gui.dialog_update("route-manager", "star"); + return; + } + + var i=1; + stars.getNode("value[0]", 1).setValue("(none)"); + foreach (var s; apt.runways[rwy].stars) { + stars.getNode("value[" ~ i ~ "]", 1).setValue(s); + i += 1; + } + + gui.dialog_update("route-manager", "star"); + } + + # initialise departure values based on current position + cmd.setValue("@posinit"); + + updateRunways(); + updateSIDs(); + updateSTARs(); @@ -189,6 +262,31 @@ command interface /autopilot/route-manager/input: /autopilot/route-manager/departure/runway false /sim/gui/dialogs/route-manager/departure-runways + + + dialog-apply + departure-runway + + + nasal + + + + + + + + + sid + 100 + /autopilot/route-manager/departure/sid + false + /sim/gui/dialogs/route-manager/sids + + + dialog-apply + sid + @@ -229,6 +327,32 @@ command interface /autopilot/route-manager/input: /autopilot/route-manager/destination/runway false /sim/gui/dialogs/route-manager/destination-runways + + + dialog-apply + destination-runway + + + + nasal + + + + + + + + + star + 100 + /autopilot/route-manager/destination/star + false + /sim/gui/dialogs/route-manager/stars + + + dialog-apply + star +