From 09d5fe703f7ac2758d8b2471e2173b0a40d35bc8 Mon Sep 17 00:00:00 2001 From: Stuart Buchanan Date: Sat, 25 Jan 2014 21:00:22 +0000 Subject: [PATCH 1/7] Replace ac-str clouds with ac for ac cloudfields. More realistic and improves performance. --- Environment/cloudlayers.xml | 41 +++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/Environment/cloudlayers.xml b/Environment/cloudlayers.xml index be85155ef..283495506 100644 --- a/Environment/cloudlayers.xml +++ b/Environment/cloudlayers.xml @@ -1,4 +1,4 @@ - + Répertoire des captures Configuration du son + Configuration des périphériques Quitter @@ -91,6 +92,7 @@ Multijoueurs Paramètres + Paramètres FGCom Fenêtre de clavardage Menu de clavardage Liste des pilotes @@ -129,6 +131,7 @@ Aide (s'ouvre dans le navigateur) Naviguer dans la documentation Aide de l'aéronef + Checklists de l'aéronef Touches communes aux aéronefs Touches de base du simulateur Configuration du joystick From 99fb72d26aaf5f14d0eb2fb677027d5b043ec6d6 Mon Sep 17 00:00:00 2001 From: Philosopher Date: Sat, 25 Jan 2014 19:19:12 -0600 Subject: [PATCH 4/7] Canvas ND: obey traffic switch --- Nasal/canvas/map/navdisplay.mfd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd index 7baa74eba..24d428dcd 100644 --- a/Nasal/canvas/map/navdisplay.mfd +++ b/Nasal/canvas/map/navdisplay.mfd @@ -147,8 +147,11 @@ var NDStyles = { { name:'mp-traffic', update_on:['toggle_range','toggle_traffic'], predicate: func(nd, layer) { - trigger_update( layer ); # clear & redraw - layer._view.setVisible( 1 ); #nd.get_switch('toggle_traffic') + var visible = nd.get_switch('toggle_traffic'); + layer._view.setVisible( visible ); + if (visible) { + trigger_update( layer ); # clear & redraw + } }, # end of layer update predicate }, # end of traffic layer @@ -349,7 +352,7 @@ var default_switches = { 'toggle_position': {path: '/inputs/pos', value:0, type:'BOOL'}, 'toggle_data': {path: '/inputs/data',value:0, type:'BOOL'}, 'toggle_terrain': {path: '/inputs/terr',value:0, type:'BOOL'}, - 'toggle_traffic': {path: '/inputs/tcas',value:0, type:'BOOL'}, + 'toggle_traffic': {path: '/inputs/tfc',value:0, type:'BOOL'}, 'toggle_centered': {path: '/inputs/nd-centered',value:0, type:'BOOL'}, 'toggle_lh_vor_adf': {path: '/inputs/lh-vor-adf',value:0, type:'INT'}, 'toggle_rh_vor_adf': {path: '/inputs/rh-vor-adf',value:0, type:'INT'}, From 381aeb918e440931d34e9f52de23707cb3b45042 Mon Sep 17 00:00:00 2001 From: Philosopher Date: Sat, 25 Jan 2014 21:13:49 -0600 Subject: [PATCH 5/7] Canvas ND: keep canvases through reinit Make fdm listener single-fire, don't listen to /sim/signals/reinit. This allows the Canvas to stay with the same placement through reinit, after both the 777 and 747 were having problems. I don't see any reason for having to recreate it all, and the cleanup function is still there (e.g. for independent windows, to have their .del() call the ND's .del()). renamed handle_reinit() -> del() --- Nasal/canvas/map/navdisplay.mfd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd index 24d428dcd..7e4b63acd 100644 --- a/Nasal/canvas/map/navdisplay.mfd +++ b/Nasal/canvas/map/navdisplay.mfd @@ -385,7 +385,7 @@ update_apl_sym(); var NavDisplay = { # reset handler - handle_reinit: func { + del: func { print("Cleaning up NavDisplay"); # shut down all timers and other loops here me.update_timer.stop(); @@ -499,7 +499,7 @@ var NavDisplay = { { if (me.inited) die("MFD already was added to scene"); me.inited = 1; - me.listen("/sim/signals/reinit", func(n) me.handle_reinit() ); + #me.listen("/sim/signals/reinit", func(n) me.del() ); me.update_timer = maketimer(0.05, func me.update() ); # TODO: make interval configurable via ctor me.nd = canvas_group; me.canvas_handle = parent; From 442aee6499c621b60893a99bba63298458dd2953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20de=20l=27Hamaide?= Date: Sun, 26 Jan 2014 16:40:08 +0100 Subject: [PATCH 6/7] FGCom: add silence threshold setting Require commit 3254f54f9ed8917f7cd21bcdb8b3e74b9d4c14a9 from flightgear --- Protocol/fgcom.xml | 7 +++++++ gui/dialogs/fgcom.xml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/Protocol/fgcom.xml b/Protocol/fgcom.xml index fea23d11e..c31876584 100644 --- a/Protocol/fgcom.xml +++ b/Protocol/fgcom.xml @@ -154,6 +154,13 @@ /sim/sound/atc/volume + + silence-threshold + double + SILENCE_THD=%1.1f + /sim/fgcom/silence-threshold + + diff --git a/gui/dialogs/fgcom.xml b/gui/dialogs/fgcom.xml index d7959550d..b0e13734a 100644 --- a/gui/dialogs/fgcom.xml +++ b/gui/dialogs/fgcom.xml @@ -237,6 +237,36 @@ true /sim/fgcom/speaker-level + + + 5 + 0 + + right + + + 5 + 1 + left + silence-thd + + -60.0 + 0.0 + 1 + /sim/fgcom/silence-threshold + + dialog-apply + silence-thd + + + + 5 + 2 + + %.1f + true + /sim/fgcom/silence-threshold + From 21fe2f44898b27a2e77e3650f465f27061079efd Mon Sep 17 00:00:00 2001 From: Hyde Yamakawa Date: Sun, 26 Jan 2014 12:07:18 -0500 Subject: [PATCH 7/7] Add altitude profile T/C, T/D, S/C and E/D mark on ND route --- Nasal/canvas/map/altitude-profile.draw | 31 ++++++++++++++++++++++++++ Nasal/canvas/map/route.draw | 16 +++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 Nasal/canvas/map/altitude-profile.draw diff --git a/Nasal/canvas/map/altitude-profile.draw b/Nasal/canvas/map/altitude-profile.draw new file mode 100644 index 000000000..14932095e --- /dev/null +++ b/Nasal/canvas/map/altitude-profile.draw @@ -0,0 +1,31 @@ +## +# Draw a altitude profile position on the route with text +# + +var drawprofile = func (group, property, disptext) +{ + var symNode = props.globals.getNode("autopilot/route-manager/vnav/"~property, 1); + var lon = symNode.getNode("longitude-deg", 1).getValue(); + var lat = symNode.getNode("latitude-deg", 1).getValue(); + var sym_group = group.createChild("group", property); + if(lon != nil) + { + var radius = 13; + sym_group.createChild("path", property) + .setStrokeLineWidth(5) + .moveTo(-radius, 0) + .arcLargeCW(radius, radius, 0, 2 * radius, 0) + .arcLargeCW(radius, radius, 0, -2 * radius, 0) + .setColor(0.195,0.96,0.097); + sym_group.createChild("text", property) + .setDrawMode( canvas.Text.TEXT ) + .setText(disptext) + .setFont("LiberationFonts/LiberationSans-Regular.ttf") + .setFontSize(28) + .setTranslation(25,35) + .setColor(0.195,0.96,0.097); + sym_group.setGeoPosition(lat, lon) + .set("z-index",4); + } +} + diff --git a/Nasal/canvas/map/route.draw b/Nasal/canvas/map/route.draw index a7edf838d..a69ef04f4 100644 --- a/Nasal/canvas/map/route.draw +++ b/Nasal/canvas/map/route.draw @@ -59,10 +59,22 @@ var draw_route = func (group, theroute, controller=nil, lod=0) append(cmds,4); canvas.drawwp(group, leg.path()[1].lat, leg.path()[1].lon, leg.alt_cstr, leg.wp_name, i, wp); } - + + # Set Top Of Crimb coordinate + canvas.drawprofile(route_group, "tc", "T/C"); + # Set Top Of Descent coordinate + canvas.drawprofile(route_group, "td", "T/D"); + # Set Step Crimb coordinate + canvas.drawprofile(route_group, "sc", "S/C"); + # Set Top Of Descent coordinate + canvas.drawprofile(route_group, "ed", "E/D"); + # Update route coordinates debug.dump(cmds); debug.dump(coords); route.setDataGeo(cmds, coords); updatewp(0); -} \ No newline at end of file + +} + +