From dccfcf2a15cffb1490fb643a57b4b6c5f9d17dd3 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Wed, 5 Jul 2017 23:57:57 -0400 Subject: [PATCH] A3XX: Seperate VOR and ILS, MAJOR FIX ND: VOR Mode working properly! (DME still maybe fucked, will fix soon if it is) --- A320-main.xml | 90 +++++++++++++++++++ Models/Instruments/MCDU1/RADNAV/RADNAV.xml | 16 ++-- Models/Instruments/MCDU2/RADNAV/RADNAV.xml | 16 ++-- .../ND/canvas/framework/navdisplay.nas | 12 +-- Models/Instruments/ND/canvas/style.nas | 12 ++- Nasal/FMGC.nas | 45 ++++++++-- Nasal/MCDU1/MCDU.nas | 2 + Nasal/MCDU1/RADNAV.nas | 22 ++--- Nasal/MCDU2/MCDU.nas | 2 + Nasal/MCDU2/RADNAV.nas | 22 ++--- Nasal/electrical.nas | 6 ++ Systems/instrumentation.xml | 27 +++++- 12 files changed, 216 insertions(+), 56 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 7dc2c406..0a785fbd 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -604,6 +604,42 @@ + + + 111.15 + /instrumentation/nav[0]/frequencies/selected-mhz + + true + 0 + + + + + 109.55 + /instrumentation/nav[1]/frequencies/selected-mhz + + true + 0 + + + + + 112.8 + /instrumentation/nav[2]/frequencies/selected-mhz + + true + 0 + + + + + 114.8 + /instrumentation/nav[3]/frequencies/selected-mhz + + true + 0 + + FCTL @@ -616,6 +652,60 @@ + + + + + + + + true diff --git a/Models/Instruments/MCDU1/RADNAV/RADNAV.xml b/Models/Instruments/MCDU1/RADNAV/RADNAV.xml index 20219d7a..3a6a0c2c 100644 --- a/Models/Instruments/MCDU1/RADNAV/RADNAV.xml +++ b/Models/Instruments/MCDU1/RADNAV/RADNAV.xml @@ -265,7 +265,7 @@ %s false BoeingCDU-Large.ttf - /instrumentation/nav[0]/radials/selected-deg + /instrumentation/nav[2]/radials/selected-deg true false false @@ -351,7 +351,7 @@ %s false BoeingCDU-Large.ttf - /instrumentation/nav[1]/radials/selected-deg + /instrumentation/nav[3]/radials/selected-deg true false false @@ -414,7 +414,7 @@ %s false BoeingCDU-Large.ttf - /FMGC/internal/ils-mcdu + /FMGC/internal/ils1-mcdu true false false @@ -437,7 +437,7 @@ %s false BoeingCDU-Large.ttf - /FMGC/internal/ils-mcdu + /FMGC/internal/ils1-mcdu true false false @@ -452,7 +452,7 @@ select ilsfreq2 - /FMGC/internal/vor1freq-set + /FMGC/internal/ils1freq-set @@ -460,7 +460,7 @@ select ilsfreq3 - /FMGC/internal/vor1freq-set + /FMGC/internal/ils1freq-set @@ -585,7 +585,7 @@ select ilscrs12 - /FMGC/internal/vor1crs-set + /FMGC/internal/ils1crs-set @@ -593,7 +593,7 @@ select ilscrs13 - /FMGC/internal/vor1crs-set + /FMGC/internal/ils1crs-set diff --git a/Models/Instruments/MCDU2/RADNAV/RADNAV.xml b/Models/Instruments/MCDU2/RADNAV/RADNAV.xml index 20219d7a..3a6a0c2c 100644 --- a/Models/Instruments/MCDU2/RADNAV/RADNAV.xml +++ b/Models/Instruments/MCDU2/RADNAV/RADNAV.xml @@ -265,7 +265,7 @@ %s false BoeingCDU-Large.ttf - /instrumentation/nav[0]/radials/selected-deg + /instrumentation/nav[2]/radials/selected-deg true false false @@ -351,7 +351,7 @@ %s false BoeingCDU-Large.ttf - /instrumentation/nav[1]/radials/selected-deg + /instrumentation/nav[3]/radials/selected-deg true false false @@ -414,7 +414,7 @@ %s false BoeingCDU-Large.ttf - /FMGC/internal/ils-mcdu + /FMGC/internal/ils1-mcdu true false false @@ -437,7 +437,7 @@ %s false BoeingCDU-Large.ttf - /FMGC/internal/ils-mcdu + /FMGC/internal/ils1-mcdu true false false @@ -452,7 +452,7 @@ select ilsfreq2 - /FMGC/internal/vor1freq-set + /FMGC/internal/ils1freq-set @@ -460,7 +460,7 @@ select ilsfreq3 - /FMGC/internal/vor1freq-set + /FMGC/internal/ils1freq-set @@ -585,7 +585,7 @@ select ilscrs12 - /FMGC/internal/vor1crs-set + /FMGC/internal/ils1crs-set @@ -593,7 +593,7 @@ select ilscrs13 - /FMGC/internal/vor1crs-set + /FMGC/internal/ils1crs-set diff --git a/Models/Instruments/ND/canvas/framework/navdisplay.nas b/Models/Instruments/ND/canvas/framework/navdisplay.nas index 6c61908c..4ee1639b 100644 --- a/Models/Instruments/ND/canvas/framework/navdisplay.nas +++ b/Models/Instruments/ND/canvas/framework/navdisplay.nas @@ -83,8 +83,8 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update me.update_sub(); # init some map properties based on switches - var vor1_path = me.get_nav_path('vor', 0); - var vor2_path = me.get_nav_path('vor', 1); + var vor1_path = "/instrumentation/nav[2]"; + var vor2_path = "/instrumentation/nav[3]"; # predicate for the draw controller var is_tuned = func(freq) { var nav1=getprop(vor1_path~ "frequencies/selected-mhz"); @@ -367,10 +367,10 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec else me.map.setTranslation(512,824); } - var vor1_path = me.get_nav_path('vor', 0); - var vor2_path = me.get_nav_path('vor', 1); - var dme1_path = me.get_nav_path('dme', 0); - var dme2_path = me.get_nav_path('dme', 1); + var vor1_path = "/instrumentation/nav[2]"; + var vor2_path = "/instrumentation/nav[3]"; + var dme1_path = "/instrumentation/dme[2]"; + var dme2_path = "/instrumentation/dme[3]"; if(me.get_switch('toggle_rh_vor_adf') == 1) { me.symbols.vorR.setText("VOR R"); diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas index 857a90b7..ead14bea 100644 --- a/Models/Instruments/ND/canvas/style.nas +++ b/Models/Instruments/ND/canvas/style.nas @@ -1182,7 +1182,11 @@ canvas.NDStyles["Airbus"] = { predicate: func(nd) (nd.in_mode('toggle_display_mode', ['APP','VOR']) and !nd.get_switch('toggle_centered')), is_true: func(nd) { nd.symbols.vorCrsPtr.show(); - nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + if (is_ils) { + nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + } else { + nd.symbols.vorCrsPtr.setRotation((getprop("instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + } }, is_false: func(nd) nd.symbols.vorCrsPtr.hide(), @@ -1198,7 +1202,11 @@ canvas.NDStyles["Airbus"] = { var is_ils = (nd.get_switch('toggle_display_mode') == 'APP'); var type = (is_ils ? 'ils' : 'vor'); var path = nd.get_nav_path(type, 0); - nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + if (is_ils) { + nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[0]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + } else { + nd.symbols.vorCrsPtr2.setRotation((getprop("/instrumentation/nav[2]/radials/selected-deg")-nd.aircraft_source.get_hdg_tru())*D2R); + } var line = nd.symbols.vorCrsPtr2.getElementById('vorCrsPtr2_line'); if(!is_ils){ line.setColor(0,0.62,0.84); diff --git a/Nasal/FMGC.nas b/Nasal/FMGC.nas index b7eebb54..4edda14a 100644 --- a/Nasal/FMGC.nas +++ b/Nasal/FMGC.nas @@ -17,7 +17,8 @@ setprop("/it-autoflight/internal/vert-speed-fpm", 0); setprop("/it-autoflight/output/fma-pwr", 0); setprop("/instrumentation/nav[0]/nav-id", "XXX"); setprop("/instrumentation/nav[1]/nav-id", "XXX"); -setprop("/FMGC/internal/ils-mcdu", "XXX/999.99"); +setprop("/FMGC/internal/ils1-mcdu", "XXX/999.99"); +setprop("/FMGC/internal/ils2-mcdu", "XXX/999.99"); setprop("/FMGC/internal/vor1-mcdu", "XXX/999.99"); setprop("/FMGC/internal/vor2-mcdu", "999.99/XXX"); @@ -230,6 +231,8 @@ var various = maketimer(1, func { var various2 = maketimer(0.5, func { nav0(); nav1(); + nav2(); + nav3(); var latmode = getprop("/it-autoflight/output/lat"); if (latmode == 0) { setprop("/it-autoflight/custom/show-hdg", 1); @@ -240,13 +243,11 @@ var nav0 = func { var freqnav0uf = getprop("/instrumentation/nav[0]/frequencies/selected-mhz"); var freqnav0 = sprintf("%.2f", freqnav0uf); var namenav0 = getprop("/instrumentation/nav[0]/nav-id"); - if (freqnav0 >= 108.10 and freqnav0 <= 117.95) { + if (freqnav0 >= 108.10 and freqnav0 <= 111.95) { if (namenav0 != "") { - setprop("/FMGC/internal/ils-mcdu", namenav0 ~ "/" ~ freqnav0); - setprop("/FMGC/internal/vor1-mcdu", namenav0 ~ "/" ~ freqnav0); + setprop("/FMGC/internal/ils1-mcdu", namenav0 ~ "/" ~ freqnav0); } else { - setprop("/FMGC/internal/ils-mcdu", freqnav0); - setprop("/FMGC/internal/vor1-mcdu", freqnav0); + setprop("/FMGC/internal/ils1-mcdu", freqnav0); } } } @@ -255,11 +256,37 @@ var nav1 = func { var freqnav1uf = getprop("/instrumentation/nav[1]/frequencies/selected-mhz"); var freqnav1 = sprintf("%.2f", freqnav1uf); var namenav1 = getprop("/instrumentation/nav[1]/nav-id"); - if (freqnav1 >= 108.10 and freqnav1 <= 117.95) { + if (freqnav1 >= 108.10 and freqnav1 <= 111.95) { if (namenav1 != "") { - setprop("/FMGC/internal/vor2-mcdu", namenav1 ~ "/" ~ freqnav1); + setprop("/FMGC/internal/ils2-mcdu", namenav1 ~ "/" ~ freqnav1); } else { - setprop("/FMGC/internal/vor2-mcdu", freqnav1); + setprop("/FMGC/internal/ils2-mcdu", freqnav1); + } + } +} + +var nav2 = func { + var freqnav2uf = getprop("/instrumentation/nav[2]/frequencies/selected-mhz"); + var freqnav2 = sprintf("%.2f", freqnav2uf); + var namenav2 = getprop("/instrumentation/nav[2]/nav-id"); + if (freqnav2 >= 108.00 and freqnav2 <= 117.95) { + if (namenav2 != "") { + setprop("/FMGC/internal/vor1-mcdu", namenav2 ~ "/" ~ freqnav2); + } else { + setprop("/FMGC/internal/vor1-mcdu", freqnav2); + } + } +} + +var nav3 = func { + var freqnav3uf = getprop("/instrumentation/nav[3]/frequencies/selected-mhz"); + var freqnav3 = sprintf("%.2f", freqnav3uf); + var namenav3 = getprop("/instrumentation/nav[3]/nav-id"); + if (freqnav3 >= 108.00 and freqnav3 <= 117.95) { + if (namenav3 != "") { + setprop("/FMGC/internal/vor2-mcdu", namenav3 ~ "/" ~ freqnav3); + } else { + setprop("/FMGC/internal/vor2-mcdu", freqnav3); } } } diff --git a/Nasal/MCDU1/MCDU.nas b/Nasal/MCDU1/MCDU.nas index a0b955b4..a433fc5c 100644 --- a/Nasal/MCDU1/MCDU.nas +++ b/Nasal/MCDU1/MCDU.nas @@ -42,6 +42,8 @@ var MCDU_reset = func { setprop("/FMGC/internal/cruise-lvl-set", 0); setprop("/FMGC/internal/flap-ths-set", 0); setprop("/FMGC/internal/flex-set", 0); + setprop("/FMGC/internal/ils1freq-set", 0); + setprop("/FMGC/internal/ils1crs-set", 0); setprop("/FMGC/internal/vor1freq-set", 0); setprop("/FMGC/internal/vor1crs-set", 0); setprop("/FMGC/internal/vor2freq-set", 0); diff --git a/Nasal/MCDU1/RADNAV.nas b/Nasal/MCDU1/RADNAV.nas index 49260743..3a83f80e 100644 --- a/Nasal/MCDU1/RADNAV.nas +++ b/Nasal/MCDU1/RADNAV.nas @@ -12,7 +12,7 @@ var radnavInput = func(key) { } else { var tfs = size(scratchpad); if (tfs == 3 or tfs == 5 or tfs == 6) { - if (scratchpad >= 108.10 and scratchpad <= 111.95) { + if (scratchpad >= 108.00 and scratchpad <= 111.95) { if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95 or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95 or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95 @@ -23,12 +23,12 @@ var radnavInput = func(key) { setprop("/MCDU[0]/scratchpad-msg", "1"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); } else { - setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor1freq-set", 1); setprop("/MCDU[0]/scratchpad", ""); } } else if (scratchpad >= 112.00 and scratchpad <= 117.95) { - setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor1freq-set", 1); setprop("/MCDU[0]/scratchpad", ""); } else { @@ -55,7 +55,7 @@ var radnavInput = func(key) { var tfs = size(scratchpad); if (tfs >= 1 and tfs <= 3) { if (scratchpad >= 0 and scratchpad <= 360) { - setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad); + setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad); setprop("/FMGC/internal/vor1crs-set", 1); setprop("/MCDU[0]/scratchpad", ""); } else { @@ -75,19 +75,19 @@ var radnavInput = func(key) { } } else if (key == "L3") { if (scratchpad == "CLR") { - setprop("/FMGC/internal/vor1freq-set", 0); + setprop("/FMGC/internal/ils1freq-set", 0); setprop("/MCDU[0]/scratchpad-msg", "0"); setprop("/MCDU[0]/scratchpad", ""); } else { var tfs = size(scratchpad); if (tfs == 3 or tfs == 5 or tfs == 6) { - if (scratchpad >= 108.10 and scratchpad <= 111.95) { + if (scratchpad >= 108.00 and scratchpad <= 111.95) { if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95 or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95 or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95 or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) { setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); - setprop("/FMGC/internal/vor1freq-set", 1); + setprop("/FMGC/internal/ils1freq-set", 1); setprop("/MCDU[0]/scratchpad", ""); } else { if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") { @@ -113,7 +113,7 @@ var radnavInput = func(key) { } } else if (key == "L4") { if (scratchpad == "CLR") { - setprop("/FMGC/internal/vor1crs-set", 0); + setprop("/FMGC/internal/ils1crs-set", 0); setprop("/MCDU[0]/scratchpad-msg", "0"); setprop("/MCDU[0]/scratchpad", ""); } else { @@ -121,7 +121,7 @@ var radnavInput = func(key) { if (tfs >= 1 and tfs <= 3) { if (scratchpad >= 0 and scratchpad <= 360) { setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad); - setprop("/FMGC/internal/vor1crs-set", 1); + setprop("/FMGC/internal/ils1crs-set", 1); setprop("/MCDU[0]/scratchpad", ""); } else { if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") { @@ -157,12 +157,12 @@ var radnavInput = func(key) { setprop("/MCDU[0]/scratchpad-msg", "1"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); } else { - setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor2freq-set", 1); setprop("/MCDU[0]/scratchpad", ""); } } else if (scratchpad >= 112.00 and scratchpad <= 117.95) { - setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor2freq-set", 1); setprop("/MCDU[0]/scratchpad", ""); } else { diff --git a/Nasal/MCDU2/MCDU.nas b/Nasal/MCDU2/MCDU.nas index deed5312..e245675e 100644 --- a/Nasal/MCDU2/MCDU.nas +++ b/Nasal/MCDU2/MCDU.nas @@ -42,6 +42,8 @@ var MCDU_reset = func { setprop("/FMGC/internal/cruise-lvl-set", 0); setprop("/FMGC/internal/flap-ths-set", 0); setprop("/FMGC/internal/flex-set", 0); + setprop("/FMGC/internal/ils1freq-set", 0); + setprop("/FMGC/internal/ils1crs-set", 0); setprop("/FMGC/internal/vor1freq-set", 0); setprop("/FMGC/internal/vor1crs-set", 0); setprop("/FMGC/internal/vor2freq-set", 0); diff --git a/Nasal/MCDU2/RADNAV.nas b/Nasal/MCDU2/RADNAV.nas index 413556af..569fbc14 100644 --- a/Nasal/MCDU2/RADNAV.nas +++ b/Nasal/MCDU2/RADNAV.nas @@ -12,7 +12,7 @@ var radnavInput = func(key) { } else { var tfs = size(scratchpad); if (tfs == 3 or tfs == 5 or tfs == 6) { - if (scratchpad >= 108.10 and scratchpad <= 111.95) { + if (scratchpad >= 108.00 and scratchpad <= 111.95) { if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95 or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95 or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95 @@ -23,12 +23,12 @@ var radnavInput = func(key) { setprop("/MCDU[1]/scratchpad-msg", "1"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); } else { - setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor1freq-set", 1); setprop("/MCDU[1]/scratchpad", ""); } } else if (scratchpad >= 112.00 and scratchpad <= 117.95) { - setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor1freq-set", 1); setprop("/MCDU[1]/scratchpad", ""); } else { @@ -55,7 +55,7 @@ var radnavInput = func(key) { var tfs = size(scratchpad); if (tfs >= 1 and tfs <= 3) { if (scratchpad >= 0 and scratchpad <= 360) { - setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad); + setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad); setprop("/FMGC/internal/vor1crs-set", 1); setprop("/MCDU[1]/scratchpad", ""); } else { @@ -75,19 +75,19 @@ var radnavInput = func(key) { } } else if (key == "L3") { if (scratchpad == "CLR") { - setprop("/FMGC/internal/vor1freq-set", 0); + setprop("/FMGC/internal/ils1freq-set", 0); setprop("/MCDU[1]/scratchpad-msg", "0"); setprop("/MCDU[1]/scratchpad", ""); } else { var tfs = size(scratchpad); if (tfs == 3 or tfs == 5 or tfs == 6) { - if (scratchpad >= 108.10 and scratchpad <= 111.95) { + if (scratchpad >= 108.00 and scratchpad <= 111.95) { if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95 or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95 or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95 or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) { setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad); - setprop("/FMGC/internal/vor1freq-set", 1); + setprop("/FMGC/internal/ils1freq-set", 1); setprop("/MCDU[1]/scratchpad", ""); } else { if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") { @@ -113,7 +113,7 @@ var radnavInput = func(key) { } } else if (key == "L4") { if (scratchpad == "CLR") { - setprop("/FMGC/internal/vor1crs-set", 0); + setprop("/FMGC/internal/ils1crs-set", 0); setprop("/MCDU[1]/scratchpad-msg", "0"); setprop("/MCDU[1]/scratchpad", ""); } else { @@ -121,7 +121,7 @@ var radnavInput = func(key) { if (tfs >= 1 and tfs <= 3) { if (scratchpad >= 0 and scratchpad <= 360) { setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad); - setprop("/FMGC/internal/vor1crs-set", 1); + setprop("/FMGC/internal/ils1crs-set", 1); setprop("/MCDU[1]/scratchpad", ""); } else { if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") { @@ -157,12 +157,12 @@ var radnavInput = func(key) { setprop("/MCDU[1]/scratchpad-msg", "1"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); } else { - setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor2freq-set", 1); setprop("/MCDU[1]/scratchpad", ""); } } else if (scratchpad >= 112.00 and scratchpad <= 117.95) { - setprop("/instrumentation/nav[1]/frequencies/selected-mhz", scratchpad); + setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad); setprop("/FMGC/internal/vor2freq-set", 1); setprop("/MCDU[1]/scratchpad", ""); } else { diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas index f5d03ac4..a7e589c2 100644 --- a/Nasal/electrical.nas +++ b/Nasal/electrical.nas @@ -79,6 +79,8 @@ var elec_init = func { setprop("/systems/electrical/outputs/mk-viii", 0); setprop("/systems/electrical/outputs/nav", 0); setprop("/systems/electrical/outputs/nav[1]", 0); + setprop("/systems/electrical/outputs/nav[2]", 0); + setprop("/systems/electrical/outputs/nav[3]", 0); setprop("/systems/electrical/outputs/pitot-head", 0); setprop("/systems/electrical/outputs/stobe-lights", 0); setprop("/systems/electrical/outputs/tacan", 0); @@ -416,6 +418,8 @@ var master_elec = func { setprop("/systems/electrical/outputs/mk-viii", 0); setprop("/systems/electrical/outputs/nav", 0); setprop("/systems/electrical/outputs/nav[1]", 0); + setprop("/systems/electrical/outputs/nav[2]", 0); + setprop("/systems/electrical/outputs/nav[3]", 0); setprop("/systems/electrical/outputs/pitot-head", 0); setprop("/systems/electrical/outputs/stobe-lights", 0); setprop("/systems/electrical/outputs/tacan", 0); @@ -448,6 +452,8 @@ var master_elec = func { setprop("/systems/electrical/outputs/mk-viii", dc_volt_std); setprop("/systems/electrical/outputs/nav", dc_volt_std); setprop("/systems/electrical/outputs/nav[1]", dc_volt_std); + setprop("/systems/electrical/outputs/nav[2]", dc_volt_std); + setprop("/systems/electrical/outputs/nav[3]", dc_volt_std); setprop("/systems/electrical/outputs/pitot-head", dc_volt_std); setprop("/systems/electrical/outputs/stobe-lights", dc_volt_std); setprop("/systems/electrical/outputs/tacan", dc_volt_std); diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml index be894889..3a79a454 100644 --- a/Systems/instrumentation.xml +++ b/Systems/instrumentation.xml @@ -64,7 +64,22 @@ file, these values will be used (they are hardcoded). dme 0 - + + + dme + 1 + + + + dme + 2 + + + + dme + 3 + + encoder 0 @@ -103,6 +118,16 @@ file, these values will be used (they are hardcoded). nav 1 + + + nav + 2 + + + + nav + 3 + slip-skid-ball