Howto:Prototyping a new NavDisplay Style: Difference between revisions

Jump to navigation Jump to search
m
No edit summary
Line 72: Line 72:


== Base Package changes ==
== Base Package changes ==
{{Note|The following patch contains changes that mainly take care of two things:
{{Note|The following patch contains changes that move the definition of aircraft specific switches back into the navdisplay.styles file, adding GUI related fields to the hash, so that these can be used to procedurally create a UI without requiring an actual cockpit (including an optional values vector). In addition, this makes deletion of the Canvas by the ND optional, so that PUI based CanvasWidgets can reuse the ND without having to reallocate a new Canvas. Also, changes references to properly resolve to canvas.Path.
* properly referencing the <code>canvas</code> namespace, so that the ND module can be separately included via <code>io.include()</code>
* moving the initialization of aircraft specific SVG elements into the <code>navdisplay.styles</code> file, and the corresponding Boeing/Airbus entries there (see <code>initialize_elements()</code>
As of 10/2016, these should be included of the base package, i.e. available in 2016.4+ <ref>https://sourceforge.net/p/flightgear/fgdata/ci/109e4524247c535026b8ebaa4e1dbb10e010a5ce/</ref>)
}}
}}
<syntaxhighlight lang="diff">diff --git a/Nasal/canvas/api.nas b/Nasal/canvas/api.nas
<syntaxhighlight lang="diff">diff --git a/Nasal/canvas/api.nas b/Nasal/canvas/api.nas
Line 91: Line 88:
     foreach (var k; keys(me.layers)) {
     foreach (var k; keys(me.layers)) {
diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd
diff --git a/Nasal/canvas/map/navdisplay.mfd b/Nasal/canvas/map/navdisplay.mfd
index d2d2ef5..f811f16 100644
index 89996f4..7f8f4f8 100644
--- a/Nasal/canvas/map/navdisplay.mfd
--- a/Nasal/canvas/map/navdisplay.mfd
+++ b/Nasal/canvas/map/navdisplay.mfd
+++ b/Nasal/canvas/map/navdisplay.mfd
@@ -106,6 +106,7 @@ var NavDisplay = {
@@ -60,33 +60,6 @@ NDSourceDriver.new = func {
  removelistener(l);
# To get started implementing your own ND, just copy the switches hash to your
# ND.nas file and map the keys to your cockpit properties - and things will just work.
-# TODO: switches are ND specific, so move to the NDStyle hash!
-
-var default_switches = {
- 'toggle_range':        {path: '/inputs/range-nm', value:40, type:'INT'},
- 'toggle_weather':      {path: '/inputs/wxr', value:0, type:'BOOL'},
- 'toggle_airports':    {path: '/inputs/arpt', value:0, type:'BOOL'},
- 'toggle_stations':    {path: '/inputs/sta', value:0, type:'BOOL'},
- 'toggle_waypoints':    {path: '/inputs/wpt', value:0, type:'BOOL'},
- '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/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'},
- 'toggle_display_mode': {path: '/mfd/display-mode', value:'MAP', type:'STRING'}, # valid values are: APP, MAP, PLAN or VOR
- 'toggle_display_type': {path: '/mfd/display-type', value:'CRT', type:'STRING'}, # valid values are: CRT or LCD
- 'toggle_true_north':  {path: '/mfd/true-north', value:0, type:'BOOL'},
- 'toggle_rangearc':    {path: '/mfd/rangearc', value:0, type:'BOOL'},
- 'toggle_track_heading':{path: '/trk-selected', value:0, type:'BOOL'},
- 'toggle_weather_live': {path: '/mfd/wxr-live-enabled', value: 0, type: 'BOOL'},
- 'toggle_chrono': {path: '/inputs/CHRONO', value: 0, type: 'INT'},
- 'toggle_xtrk_error': {path: '/mfd/xtrk-error', value: 0, type: 'BOOL'},
- 'toggle_trk_line': {path: '/mfd/trk-line', value: 0, type: 'BOOL'},
- 'toggle_hdg_bug_only': {path: '/mfd/hdg-bug-only', value: 0, type: 'BOOL'},
-};
-
##
# TODO:
# - introduce a MFD class (use it also for PFD/EICAS)
@@ -96,20 +69,26 @@ var NavDisplay = {
# static
id:0,
- del: func {
+ del: func(destroy_canvas=1) {
print("Cleaning up NavDisplay");
# shut down all timers and other loops here
me.update_timer.stop();
foreach(var t; me.timers)
  t.stop();
foreach(var l; me.listeners)
- removelistener(l);
+ # removelistener(l);
+ call(removelistener, [l]);
  # clean up MapStructure
  # clean up MapStructure
  me.map.del();
  me.map.del();
+ # call(canvas.Map.del, [], me.map);
# call(canvas.Map.del, [], me.map);
# destroy the canvas
- # destroy the canvas
if (me.canvas_handle != nil)
- if (me.canvas_handle != nil)
+
+ me.nd.del(); # delete symbols (compass rose etc, needed in case we keep the underlying canvas)
+
+ # destroy the canvas (now optional, we may not always want to delete the whole canvas)
+ if (destroy_canvas and me.canvas_handle != nil) {
+ print("ND: destroying Canvas!");
  me.canvas_handle.del();
  me.canvas_handle.del();
@@ -253,7 +254,7 @@ var NavDisplay = {
+ }
  me.df_options = nil;
me.inited = 0;
NavDisplay.id -= 1;
},
@@ -127,7 +106,7 @@ var NavDisplay = {
listen_switch: func(s,c) {
# print("event setup for: ", id(c));
if (!contains(me.efis_switches, s)) {
- print('EFIS Switch not defined: '~ s);
+ print('cannot set up listener, EFIS Switch not defined in style/switches: '~ s);
return;
}
me.listen( me.get_full_switch_path(s), func {
@@ -178,14 +157,26 @@ var NavDisplay = {
# TODO: the ctor should allow customization, for different aircraft
# especially properties and SVG files/handles (747, 757, 777 etc)
- new : func(prop1, switches=default_switches, style='Boeing') {
+ new : func(prop1, switches, style='Boeing') {
+
+ # if no custom switches specified, use default switches
+ if (switches==nil) {
+ print("ND: Using ND specific default switches");
+ switches = NDStyles[styles].default_switches;
+ }
+
NavDisplay.id +=1;
var m = { parents : [NavDisplay]};
- var df_toggles = keys(default_switches);
+ m.nd_style = NDStyles[style]; # look up ND specific stuff (file names etc)
+
+ var df_toggles = keys(m.nd_style.default_switches);
+ print("ND specific default switches:", size(df_toggles));
foreach(var toggle_name; df_toggles){
- if(!contains(switches, toggle_name))
- switches[toggle_name] = default_switches[toggle_name];
+ if(!contains(switches, toggle_name)) {
+ print("Undefined ND switch, using default mapping for:", toggle_name);
+ switches[toggle_name] = m.nd_style.default_switches[toggle_name];
+ }
}
m.inited = 0;
@@ -194,11 +185,11 @@ var NavDisplay = {
m.listeners=[]; # for cleanup handling
m.aircraft_source = NDSourceDriver.new(); # uses the main aircraft as the driver/source (speeds, position, heading)
- m.nd_style = NDStyles[style]; # look up ND specific stuff (file names etc)
m.style_name = style;
m.radio_list=["instrumentation/comm/frequencies","instrumentation/comm[1]/frequencies",
              "instrumentation/nav/frequencies", "instrumentation/nav[1]/frequencies"];
+ # FIXME: this is redundant, must be moved to the style/Switches list
m.mfd_mode_list=["APP","VOR","MAP","PLAN"];
m.efis_path = prop1;
@@ -251,7 +242,7 @@ var NavDisplay = {
  me.update_timer = maketimer(update_time, func me.update() );
me.nd = canvas_group;
me.canvas_handle = parent;
- me.df_options = nil;
+ me.df_options = { map:{width:1024, height:1024} };
  if (contains(me.nd_style, 'options'))
  if (contains(me.nd_style, 'options'))
  me.df_options = me.nd_style.options;
  me.df_options = me.nd_style.options;
- nd_options = default_hash(nd_options, me.df_options);
nd_options = canvas.default_hash(nd_options, me.df_options);
+ nd_options = canvas.default_hash(nd_options, me.df_options);
@@ -278,7 +269,8 @@ var NavDisplay = {
me.options = nd_options;
me.route_driver = nil;
if (me.options == nil) me.options = {};
@@ -275,22 +276,9 @@ var NavDisplay = {
if(contains(feature.impl,'init')) feature.impl.init(me.nd, feature); # call The element's init code (i.e. updateCenter)
}
   
   
- ### this is the "old" method that's less flexible, we want to use the style hash instead (see above)
me.nd_style.initialize_elements(me);
- # because things are much better configurable that way
- # now look up all required SVG elements and initialize member fields using the same name  to have a convenient handle
- foreach(var element; ["dmeLDist","dmeRDist","dmeL","dmeR","vorL","vorR","vorLId","vorRId",
-                       "status.wxr","status.wpt","status.sta","status.arpt"])
- me.symbols[element] = me.nd.getElementById(element);
+ me.nd_style.initialize_elements(me);
   
   
- # load elements from vector image, and create instance variables using identical names, and call updateCenter() on each
-
- # anything that needs updatecenter called, should be added to the vector here
- #
- foreach(var element; ["staArrowL2","staArrowR2","staFromL2","staToL2","staFromR2","staToR2",
-                       "hdgTrk","trkInd","hdgBug","HdgBugCRT","TrkBugLCD","HdgBugLCD","curHdgPtr",
-                       "HdgBugCRT2","TrkBugLCD2","HdgBugLCD2","hdgBug2","selHdgLine","selHdgLine2","curHdgPtr2",
-                       "staArrowL","staArrowR","staToL","staFromL","staToR","staFromR"] )
- me.symbols[element] = me.nd.getElementById(element).updateCenter();
-
+
+
+ # var map_rect = [124, me.options.map.width, me.options.map.height, 0];
  var map_rect = [124, 1024, 1024, 0];
  var map_rect = [124, 1024, 1024, 0];
  var map_opts = me.options['map'];
  var map_opts = me.options['map'];
  if (map_opts == nil) map_opts = {};
  if (map_opts == nil) map_opts = {};
@@ -342,6 +330,7 @@ var NavDisplay = {
@@ -582,7 +574,7 @@ var NavDisplay = {
  get_tuned_course:get_course_by_freq,
  me.map.setTranslation(trsl.x, trsl.y);
get_position: get_current_position,
} else {
new: func(map) return { parents:[controller], map:map },
if(me.in_mode('toggle_display_mode', ['PLAN']))
+ del: func() {print("cleaning up nd controller");},
- me.map.setTranslation(512,512);
should_update_all: func {
+ me.map.setTranslation(512,512); # FIXME use options hash to look up actual texture dimensions here
# TODO: this is just copied from aircraftpos.controller,
  elsif(me.get_switch('toggle_centered'))
# it really should be moved to somewhere common and reused
me.map.setTranslation(512,565);
@@ -386,12 +375,12 @@ var NavDisplay = {
else
if(!layer['isMapStructure']) # set up an old INEFFICIENT and SLOW layer
the_layer = me.layers[layer.name] = canvas.MAP_LAYERS[layer.name].new( me.map, layer.name, controller );
else {
- printlog(_MP_dbg_lvl, "Setting up MapStructure-based layer for ND, name:", layer.name);
+ printlog(canvas._MP_dbg_lvl, "Setting up MapStructure-based layer for ND, name:", layer.name);
var opt = me.options != nil and me.options[layer.name] != nil ? me.options[layer.name] : nil;
if (opt == nil and contains(layer, 'options'))
opt = layer.options;
if (opt != nil and default_opts != nil)
- opt = default_hash(opt, default_opts);
+ opt = canvas.default_hash(opt, default_opts);
#elsif(default_opts != nil)
#    opt = default_opts;
var style = nil;
@@ -420,7 +409,7 @@ var NavDisplay = {
l.predicate = func {
var t = systime();
call(_predicate, arg, me);
- printlog(_MP_dbg_lvl, "Took "~((systime()-t)*1000)~"ms to update layer "~l.name);
+ printlog(canvas._MP_dbg_lvl, "Took "~((systime()-t)*1000)~"ms to update layer "~l.name);
}
})();
  }
@@ -805,7 +794,7 @@ var NavDisplay = {
me.symbols['status.arpt'].setVisible( me.get_switch('toggle_airports') and me.in_mode('toggle_display_mode', ['MAP']));
me.symbols['status.sta'].setVisible( me.get_switch('toggle_stations') and  me.in_mode('toggle_display_mode', ['MAP']));
# Okay, _how_ do we hook this up with FGPlot?
- printlog(_MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
+ printlog(canvas._MP_dbg_lvl, "Total ND update took "~((systime()-_time)*100)~"ms");
setprop("/instrumentation/navdisplay["~ NavDisplay.id ~"]/update-ms", systime() - _time);
} # of update() method (50% of our file ...seriously?)
};
diff --git a/Nasal/canvas/map/navdisplay.styles b/Nasal/canvas/map/navdisplay.styles
diff --git a/Nasal/canvas/map/navdisplay.styles b/Nasal/canvas/map/navdisplay.styles
index 7712727..52751a2 100644
index c2196c8..6539d63 100644
--- a/Nasal/canvas/map/navdisplay.styles
--- a/Nasal/canvas/map/navdisplay.styles
+++ b/Nasal/canvas/map/navdisplay.styles
+++ b/Nasal/canvas/map/navdisplay.styles
@@ -34,6 +34,27 @@ var NDStyles = {
@@ -29,6 +29,37 @@ var NDStyles = {
  # aircraft developers should all be editing the same ND.svg image
return "LiberationFonts/LiberationSans-Regular.ttf";
# the code can deal with the differences now
  },
svg_filename: "Nasal/canvas/map/Images/boeingND.svg",
+ # to be used for validating new/modified styles, this can be used to encode a list of switches that
+ # should be configured by the aircraft developer, lest the ND may not work completely
+
+# switches are ND specific, TODO: use UI version with legends/labels
+
+
+ initialize_elements: func(me) {
+default_switches: {
+    # symbolic alias : GUI legend/tooltip, relative property (as used in bindings), initial value, valid values (vector), property type
+    # TODO: should support a vector of valid_values() (ranges)
+    'toggle_range':        {legend:'rng', path: '/inputs/range-nm', value:40, values:[10,20,40,80,160,320], type:'INT'},
+    'toggle_weather':      {legend:'wxr', path: '/inputs/wxr', value:0, type:'BOOL'},
+    'toggle_airports':      {legend:'apt', path: '/inputs/arpt', value:0, type:'BOOL'},
+    'toggle_stations':      {legend:'sta', path: '/inputs/sta', value:0, type:'BOOL'},
+    'toggle_waypoints':    {legend:'wpt', path: '/inputs/wpt', value:0, type:'BOOL'},
+    'toggle_position':      {legend:'pos', path: '/inputs/pos', value:0, type:'BOOL'},
+    'toggle_data':          {legend:'dat', path: '/inputs/data',value:0, type:'BOOL'},
+    'toggle_terrain':      {legend:'terr', path: '/inputs/terr',value:0, type:'BOOL'},
+    'toggle_traffic':      {legend:'tfc', path: '/inputs/tfc',value:0, type:'BOOL'},
+    'toggle_centered':      {legend:'ctr', path: '/inputs/nd-centered',value:0, type:'BOOL'},
+    'toggle_lh_vor_adf':    {legend:'vor/adf (l)', path: '/inputs/lh-vor-adf',value:0, values:{'VOR':1, 'OFF':0, 'ADF':-1 }, type:'INT'},
+    'toggle_rh_vor_adf':    {legend:'vor/adf (r)', path: '/inputs/rh-vor-adf',value:0, values:{'VOR':1, 'OFF':0, 'ADF':-1 }, type:'INT'},
+    'toggle_display_mode':  {legend:'map',path: '/mfd/display-mode', value:'MAP', values:['APP', 'MAP', 'PLAN', 'VOR' ], type:'STRING'},
+    'toggle_display_type':  {legend:'lcd',path: '/mfd/display-type', value:'LCD', values:['CRT', 'LCD' ], type:'STRING'},
+    'toggle_true_north':    {legend:'tru',path: '/mfd/true-north', value:0, type:'BOOL'},
+    'toggle_rangearc':      {legend:'rng',path: '/mfd/rangearc', value:0, type:'BOOL'},
+    'toggle_track_heading': {legend:'trk',path: '/hdg-trk-selected', value:0, type:'BOOL'},
+    'toggle_hdg_bug_only':  {legend:'hdg',path: '/hdg-bug-only', value:0, type:'BOOL'},
+    # add any new switches here (and update navdisplay.styles as needed)
+
+}, # end of aircraft-specific default switches
+
+
+ ### this is the "old" method that's less flexible, we want to use the style hash instead (see above)
+ # because things are much better configurable that way
+ # now look up all required SVG elements and initialize member fields using the same name  to have a convenient handle
+ foreach(var element; ["dmeLDist","dmeRDist","dmeL","dmeR","vorL","vorR","vorLId","vorRId",
+                       "status.wxr","status.wpt","status.sta","status.arpt"])
+ me.symbols[element] = me.nd.getElementById(element);
+
+
+ # load elements from vector image, and create instance variables using identical names, and call updateCenter() on each
# where all the symbols are stored
+ # anything that needs updatecenter called, should be added to the vector here
# TODO: SVG elements should be renamed to use boeing/airbus prefix
+ #
# aircraft developers should all be editing the same ND.svg image
+ foreach(var element; ["staArrowL2","staArrowR2","staFromL2","staToL2","staFromR2","staToR2",
@@ -52,7 +83,7 @@ var NDStyles = {
+                       "hdgTrk","trkInd","hdgBug","HdgBugCRT","TrkBugLCD","HdgBugLCD","curHdgPtr",
                      "HdgBugCRT2","TrkBugLCD2","HdgBugLCD2","hdgBug2","selHdgLine","selHdgLine2","curHdgPtr2",
+                       "HdgBugCRT2","TrkBugLCD2","HdgBugLCD2","hdgBug2","selHdgLine","selHdgLine2","curHdgPtr2",
                      "staArrowL","staArrowR","staToL","staFromL","staToR","staFromR"] )
+                       "staArrowL","staArrowR","staToL","staFromL","staToR","staFromR"] )
me.symbols[element] = me.nd.getElementById(element).updateCenter();
+ me.symbols[element] = me.nd.getElementById(element).updateCenter();
-
+
+
+ }, # initialize_elements
}, # initialize_elements
+
##
## this loads and configures existing layers (currently, *.layer files in Nasal/canvas/map)
  ##
  ##
@@ -1132,6 +1153,29 @@ var NDStyles = {
@@ -1147,6 +1178,43 @@ var NDStyles = {
# aircraft developers should all be editing the same ND.svg image
if( family == "Liberation Sans" and weight == "normal" )
  # the code can deal with the differences now
return "LiberationFonts/LiberationSans-Regular.ttf";
svg_filename: "Nasal/canvas/map/Airbus/Images/airbusND.svg",
  },
+# switches are ND specific, TODO: see actual Airbus ND.nas (artix/omega95)
+
+
+ initialize_elements: func(me) {
+# switches are ND specific, TODO: use UI version with legends/labels
+# https://github.com/artix75/A320neo/blob/master/Models/Instruments/ND/canvas/ND.nas#L16
+
+
+ ### this is the "old" method that's less flexible, we want to use the style hash instead (see above)
+default_switches: {
+ # because things are much better configurable that way
+ # symbolic alias : relative property (as used in bindings), initial value, type
+ # now look up all required SVG elements and initialize member fields using the same name  to have a convenient handle
+ 'toggle_range': {legend: "range", path: '/inputs/range-nm', value:40, values:[10,20,40,80,160,320],type:'INT'},
+ foreach(var element; ["dmeLDist","dmeRDist","dmeL","dmeR","vorL","vorR","vorLId","vorRId",
+ 'toggle_weather': {legend: "wxr", path: '/inputs/wxr', value:0, type:'BOOL'},
+                       "status.wxr","status.wpt","status.sta","status.arpt"])
+ 'toggle_airports': {legend: "apt", path: '/inputs/arpt', value:0, type:'BOOL'},
+ me.symbols[element] = me.nd.getElementById(element);
+ 'toggle_ndb': {legend: "ndb", path: '/inputs/NDB', value:0, type:'BOOL'},
+ 'toggle_stations':    {legend: "sta", path: '/inputs/sta', value:0, type:'BOOL'},
+ 'toggle_vor': {legend:"vor", path: '/inputs/VORD', value:0, type:'BOOL'},
+ 'toggle_dme': {legend: "dme", path: '/inputs/DME', value:0, type:'BOOL'},
+ 'toggle_cstr': {legend: "cstr", path: '/inputs/CSTR', value:0, type:'BOOL'},
+ 'toggle_waypoints': {legend:"wpt", path: '/inputs/wpt', value:0, type:'BOOL'},
+ 'toggle_position': {legend:"pos", path: '/inputs/pos', value:0, type:'BOOL'},
+ 'toggle_data': {legend:"dat", path: '/inputs/data',value:0, type:'BOOL'},
+ 'toggle_terrain': {legend:"terr", path: '/inputs/terr',value:0, type:'BOOL'},
+ 'toggle_traffic': {legend:"tfc",path: '/inputs/tfc',value:0, type:'BOOL'},
+ 'toggle_centered': {legend:"ctr",path: '/inputs/nd-centered',value:0, type:'BOOL'},
+ 'toggle_lh_vor_adf': {legend:"vor/adf(l)",path: '/input/lh-vor-adf',value:0, values:{'VOR':1, 'OFF':0, 'ADF':-1 }, type:'INT'},
+ 'toggle_rh_vor_adf': {legend:"vor/adf(r)", path: '/input/rh-vor-adf',value:0,values:{'VOR':1, 'OFF':0, 'ADF':-1 }, type:'INT'},
+ # FIXME: this should be reviewed by one of the airbus developers, not sure if these values make sense for the Airbus style (will only affect the GUI dialog though)
+ 'toggle_display_mode': {legend: "mode", path: '/nd/canvas-display-mode', value:'NAV', values:['NAV','APP','MAP','VOR','PLAN'],type:'STRING'},
+ 'toggle_display_type': {legend: "LCD/CRT", path: '/mfd/display-type', value:'LCD', values:['LCD','CRT'],type:'STRING'},
+ 'toggle_true_north': {legend: "tru", path: '/mfd/true-north', value:1, type:'BOOL'},
+ 'toggle_track_heading': {legend:"trk", path: '/trk-selected', value:0, type:'BOOL'},
+ 'toggle_wpt_idx': {legend:"wpt idx", path: '/inputs/plan-wpt-index', value: -1,type: 'INT'},
+ 'toggle_plan_loop': {legend:"plan loop", path: '/nd/plan-mode-loop', value: 0,type: 'INT'},
+ 'toggle_weather_live': {legend: "live wxr", path: '/mfd/wxr-live-enabled', value: 0, type: 'BOOL'},
+ 'toggle_chrono': {legend:"chrono", path: '/inputs/CHRONO', value: 0, values:[],type: 'INT'},
+ 'toggle_xtrk_error': {legend: "xte", path: '/mfd/xtrk-error', value: 0,type: 'BOOL'},
+ 'toggle_trk_line': {legend:"trk line", path: '/mfd/trk-line', value: 0, type: 'BOOL'},
+ # add new switches here
+}, # end of aircraft-specific default switches
+
+
+ # load elements from vector image, and create instance variables using identical names, and call updateCenter() on each
+ # anything that needs updatecenter called, should be added to the vector here
# where all the symbols are stored
+ #
# TODO: SVG elements should be renamed to use boeing/airbus prefix
+ foreach(var element; ["staArrowL2","staArrowR2","staFromL2","staToL2","staFromR2","staToR2",
@@ -1171,7 +1239,7 @@ var NDStyles = {
+                       "hdgTrk","trkInd","hdgBug","HdgBugCRT","TrkBugLCD","HdgBugLCD","curHdgPtr",
                      "HdgBugCRT2","TrkBugLCD2","HdgBugLCD2","hdgBug2","selHdgLine","selHdgLine2","curHdgPtr2",
+                       "HdgBugCRT2","TrkBugLCD2","HdgBugLCD2","hdgBug2","selHdgLine","selHdgLine2","curHdgPtr2",
                      "staArrowL","staArrowR","staToL","staFromL","staToR","staFromR"] )
+                       "staArrowL","staArrowR","staToL","staFromL","staToR","staFromR"] )
me.symbols[element] = me.nd.getElementById(element).updateCenter();
+ me.symbols[element] = me.nd.getElementById(element).updateCenter();
-
+
+
+ }, # initialize_elements
}, # initialize_elements
+
+
+
@@ -1530,9 +1598,9 @@ var NDStyles = {
##
var adf1_frq = getprop(me.options.adf1_frq);
## this loads and configures existing layers (currently, *.layer files in Nasal/canvas/map)
var adf2_frq = getprop(me.options.adf2_frq);
##
if(adf1_frq == frq or adf2_frq == frq){
 
- me.element.setColor(tuned_color, [Path]);
+ me.element.setColor(tuned_color, [canvas.Path]);
} else {
- me.element.setColor(dfcolor, [Path]);
+ me.element.setColor(dfcolor, [canvas.Path]);
}
}
},
</syntaxhighlight>
</syntaxhighlight>


Navigation menu