diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index ea54e539..644fc67b 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -22,6 +22,17 @@ setlistener("/sim/signals/fdm-initialized", func { # print(file); #} +var systemsReset = func { + systems.elec_init(); + systems.ADIRSreset(); + systems.pneu_init(); + systems.hyd_init(); + fmgc.FMGCinit(); + mcdu1.MCDU_reset(); + mcdu2.MCDU_reset(); + itaf.ap_init(); +} + ################ # Panel States # ################ @@ -42,11 +53,7 @@ var colddark = func { A320.flaptimer.stop(); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/gear/gear-down", 1); - systems.elec_init(); - systems.ADIRSreset(); - systems.pneu_init(); - systems.hyd_init(); - itaf.ap_init(); + systemsReset(); setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd2", 1); if (getprop("/engines/engine[1]/n2") < 2) { @@ -89,11 +96,7 @@ var beforestart = func { A320.flaptimer.stop(); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/gear/gear-down", 1); - systems.elec_init(); - systems.ADIRSreset(); - systems.pneu_init(); - systems.hyd_init(); - itaf.ap_init(); + systemsReset(); setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd2", 1); setprop("/controls/APU/master", 0); @@ -139,6 +142,7 @@ var beforestart_b = func { setprop("instrumentation/adirs/ir[0]/aligned",1); setprop("instrumentation/adirs/ir[1]/aligned",1); setprop("instrumentation/adirs/ir[2]/aligned",1); + setprop("/controls/adirs/mcducbtn", 1); setprop("/systems/acconfig/autoconfig-running", 0); ps_load_dlg.close(); ps_loaded_dlg.open(); @@ -160,11 +164,7 @@ var taxi = func { A320.flaptimer.stop(); setprop("/controls/flight/speedbrake-arm", 0); setprop("/controls/gear/gear-down", 1); - systems.elec_init(); - systems.ADIRSreset(); - systems.pneu_init(); - systems.hyd_init(); - itaf.ap_init(); + systemsReset(); setprop("/it-autoflight/input/fd1", 1); setprop("/it-autoflight/input/fd2", 1); setprop("/controls/APU/master", 0); @@ -210,6 +210,7 @@ var taxi_b = func { setprop("instrumentation/adirs/ir[0]/aligned",1); setprop("instrumentation/adirs/ir[1]/aligned",1); setprop("instrumentation/adirs/ir[2]/aligned",1); + setprop("/controls/adirs/mcducbtn", 1); settimer(taxi_c, 0.5); } var taxi_c = func { diff --git a/Models/Instruments/MCDU1/INITA/INITA.xml b/Models/Instruments/MCDU1/INITA/INITA.xml index 55d367b4..2952d7b8 100644 --- a/Models/Instruments/MCDU1/INITA/INITA.xml +++ b/Models/Instruments/MCDU1/INITA/INITA.xml @@ -95,20 +95,20 @@ - + + + + fromto2 + + -0.001 + 0.043 + 0.0715 + + right-center + yz-plane + text-value + /%s + false + BoeingCDU-Large.ttf + /FMGC/internal/arr-arpt + true + false + false + 0.0050 + + 64 + 64 + + + + + select + fromto2 + + /FMGC/internal/tofrom-set + + altncorte @@ -282,6 +314,19 @@ 64 + + + select + alignirs + alignirs-arrow + + + /FMGC/internal/tofrom-set + /controls/adirs/mcducbtn + + + + + + + + select + fltnmbr2 + + /MCDUC/flight-num-set + + costindex @@ -427,6 +480,7 @@ select costindex2 + /FMGC/internal/tofrom-set /FMGC/internal/cost-index-set @@ -582,6 +636,7 @@ select crzfltemp2 + /FMGC/internal/tofrom-set /FMGC/internal/cruise-lvl-set @@ -839,6 +894,8 @@ tropovalue LONG-val LAT-val + fromto2 + fltnmbr2 costindex3 crzfltemp3 diff --git a/Models/Instruments/MCDU1/INITA/INITBOX.ac b/Models/Instruments/MCDU1/INITA/INITBOX.ac index 27bd30c4..4ceff468 100644 --- a/Models/Instruments/MCDU1/INITA/INITBOX.ac +++ b/Models/Instruments/MCDU1/INITA/INITBOX.ac @@ -3,9 +3,9 @@ MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 128 trans MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 1 1 1 spec 0 0 0 shi 128 trans 0 MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 0 trans 0 OBJECT world -kids 5 +kids 6 OBJECT poly -name "fromto" +name "fromtobox" loc -0.0691401 -0.000598909 -0.016447 data 10 enginepane @@ -212,7 +212,7 @@ refs 4 1 0.847897 0.937924 kids 0 OBJECT poly -name "coroute" +name "coroutebox" loc -0.0690906 -0.00060165 0.00956676 data 10 enginepane @@ -233,28 +233,7 @@ refs 4 2 0.00547499 0.697977 kids 0 OBJECT poly -name "face" -loc -0.0925569 -0.0235122 0.00196775 -data 10 -enginepane -texture "amberbox.png" -crease 30.000002 -numvert 4 --0.000122987 0 0.028218 -0.00643683 1.49012e-008 0.028218 -0.00643683 1.49012e-008 -0.00762965 --0.000122987 0 -0.00762965 -numsurf 1 -SURF 0x0 -mat 2 -refs 4 -3 0.634683 0.490563 -0 4.45843e-005 0.490563 -1 4.45843e-005 0.000756443 -2 0.634683 0.000756443 -kids 0 -OBJECT poly -name "fltnum" +name "fltnumbox" loc -0.055732 -0.00059823 0.0550418 data 10 enginepane @@ -274,3 +253,45 @@ refs 4 2 0.986171 0.15482 1 0.986171 0.346666 kids 0 +OBJECT poly +name "cruisetempbox" +loc -0.023689 -0.000601875 0.0120288 +data 10 +enginepane +texture "amberbox.png" +crease 30.000002 +numvert 4 +0.00300897 4.30737e-009 0.00540834 +0.00300897 4.30737e-009 0.0335519 +0.00743973 1.02445e-008 0.00540834 +0.00743973 1.02445e-008 0.0335519 +numsurf 1 +SURF 0x0 +mat 2 +refs 4 +2 0.425175 0.153011 +0 0.425175 0.348573 +1 0.0378401 0.348573 +3 0.0378401 0.153011 +kids 0 +OBJECT poly +name "costindexbox" +loc -0.0341378 -0.000601875 0.0443633 +data 10 +enginepane +texture "amberbox.png" +crease 30.000002 +numvert 4 +0.00302765 4.36557e-009 0.00121848 +0.00302765 4.36557e-009 -0.00862511 +0.00747692 1.03028e-008 -0.00862511 +0.00747692 1.03028e-008 0.00121848 +numsurf 1 +SURF 0x0 +mat 2 +refs 4 +0 0.48284 0.347748 +3 0.48284 0.151369 +2 0.618316 0.151369 +1 0.618316 0.347748 +kids 0 diff --git a/Models/Instruments/MCDU1/INITA/INITBOX.xml b/Models/Instruments/MCDU1/INITA/INITBOX.xml index 97fc8370..dc19f5d4 100644 --- a/Models/Instruments/MCDU1/INITA/INITBOX.xml +++ b/Models/Instruments/MCDU1/INITA/INITBOX.xml @@ -10,4 +10,42 @@ INITBOX.ac + + select + fromtobox + + /FMGC/internal/tofrom-set + + + + + select + costindexbox + + + /FMGC/internal/tofrom-set + /FMGC/internal/cost-index-set + + + + + + select + cruisetempbox + + + /FMGC/internal/tofrom-set + /FMGC/internal/cruise-lvl-set + + + + + + select + fltnumbox + + /MCDUC/flight-num-set + + + diff --git a/Models/Instruments/MCDU1/INITA/amberbox.png b/Models/Instruments/MCDU1/INITA/amberbox.png index f94d29f2..81db5bdf 100644 Binary files a/Models/Instruments/MCDU1/INITA/amberbox.png and b/Models/Instruments/MCDU1/INITA/amberbox.png differ diff --git a/Models/Instruments/MCDU1/MCDU1.xml b/Models/Instruments/MCDU1/MCDU1.xml index 754825a3..b210b6c6 100644 --- a/Models/Instruments/MCDU1/MCDU1.xml +++ b/Models/Instruments/MCDU1/MCDU1.xml @@ -207,7 +207,7 @@ init - false + true nasal @@ -226,7 +226,7 @@ data - false + true nasal @@ -245,7 +245,7 @@ perf - false + true nasal @@ -264,7 +264,7 @@ L1 - false + true nasal @@ -282,7 +282,7 @@ L2 - false + true nasal @@ -300,7 +300,7 @@ L3 - false + true nasal @@ -318,7 +318,7 @@ L4 - false + true nasal @@ -336,7 +336,7 @@ L5 - false + true nasal @@ -354,7 +354,7 @@ L6 - false + true nasal @@ -373,7 +373,7 @@ R1 - false + true nasal @@ -391,7 +391,7 @@ R2 - false + true nasal @@ -409,7 +409,7 @@ R3 - false + true nasal @@ -427,7 +427,7 @@ R4 - false + true nasal @@ -445,7 +445,7 @@ R5 - false + true nasal @@ -463,7 +463,7 @@ R6 - false + true nasal @@ -482,7 +482,7 @@ left - false + true nasal @@ -500,7 +500,7 @@ right - false + true nasal @@ -518,7 +518,7 @@ up - false + true nasal @@ -536,7 +536,7 @@ down - false + true nasal @@ -555,7 +555,7 @@ a - false + true nasal @@ -573,7 +573,7 @@ b - false + true nasal @@ -591,7 +591,7 @@ c - false + true nasal @@ -609,7 +609,7 @@ d - false + true nasal @@ -627,7 +627,7 @@ e - false + true nasal @@ -645,7 +645,7 @@ f - false + true nasal @@ -663,7 +663,7 @@ g - false + true nasal @@ -681,7 +681,7 @@ h - false + true nasal @@ -699,7 +699,7 @@ i - false + true nasal @@ -717,7 +717,7 @@ j - false + true nasal @@ -735,7 +735,7 @@ k - false + true nasal @@ -753,7 +753,7 @@ l - false + true nasal @@ -771,7 +771,7 @@ m - false + true nasal @@ -789,7 +789,7 @@ n - false + true nasal @@ -807,7 +807,7 @@ o - false + true nasal @@ -825,7 +825,7 @@ p - false + true nasal @@ -843,7 +843,7 @@ q - false + true nasal @@ -861,7 +861,7 @@ r - false + true nasal @@ -879,7 +879,7 @@ s - false + true nasal @@ -897,7 +897,7 @@ t - false + true nasal @@ -915,7 +915,7 @@ u - false + true nasal @@ -933,7 +933,7 @@ v - false + true nasal @@ -951,7 +951,7 @@ w - false + true nasal @@ -969,7 +969,7 @@ x - false + true nasal @@ -987,7 +987,7 @@ y - false + true nasal @@ -1005,7 +1005,7 @@ z - false + true nasal @@ -1023,7 +1023,7 @@ / - false + true nasal @@ -1041,7 +1041,7 @@ sp - false + true nasal @@ -1059,7 +1059,7 @@ overfly - false + true nasal @@ -1077,7 +1077,7 @@ clr - false + true nasal @@ -1095,7 +1095,7 @@ 0 - false + true nasal @@ -1113,7 +1113,7 @@ 1 - false + true nasal @@ -1131,7 +1131,7 @@ 2 - false + true nasal @@ -1149,7 +1149,7 @@ 3 - false + true nasal @@ -1167,7 +1167,7 @@ 4 - false + true nasal @@ -1185,7 +1185,7 @@ 5 - false + true nasal @@ -1203,7 +1203,7 @@ 6 - false + true nasal @@ -1221,7 +1221,7 @@ 7 - false + true nasal @@ -1239,7 +1239,7 @@ 8 - false + true nasal @@ -1257,7 +1257,7 @@ 9 - false + true nasal @@ -1275,7 +1275,7 @@ . - false + true nasal @@ -1288,12 +1288,12 @@ - + diff --git a/Models/Instruments/MCDU2/INITA/INITA.xml b/Models/Instruments/MCDU2/INITA/INITA.xml index a5162204..2952d7b8 100644 --- a/Models/Instruments/MCDU2/INITA/INITA.xml +++ b/Models/Instruments/MCDU2/INITA/INITA.xml @@ -95,20 +95,20 @@ - + + + + fromto2 + + -0.001 + 0.043 + 0.0715 + + right-center + yz-plane + text-value + /%s + false + BoeingCDU-Large.ttf + /FMGC/internal/arr-arpt + true + false + false + 0.0050 + + 64 + 64 + + + + + select + fromto2 + + /FMGC/internal/tofrom-set + + altncorte @@ -282,6 +314,19 @@ 64 + + + select + alignirs + alignirs-arrow + + + /FMGC/internal/tofrom-set + /controls/adirs/mcducbtn + + + + + + + + select + fltnmbr2 + + /MCDUC/flight-num-set + + costindex @@ -427,6 +480,7 @@ select costindex2 + /FMGC/internal/tofrom-set /FMGC/internal/cost-index-set @@ -582,6 +636,7 @@ select crzfltemp2 + /FMGC/internal/tofrom-set /FMGC/internal/cruise-lvl-set @@ -839,6 +894,9 @@ tropovalue LONG-val LAT-val + fromto2 + fltnmbr2 + costindex3 crzfltemp3 0 diff --git a/Models/Instruments/MCDU2/INITA/INITBOX.ac b/Models/Instruments/MCDU2/INITA/INITBOX.ac index 27bd30c4..4ceff468 100644 --- a/Models/Instruments/MCDU2/INITA/INITBOX.ac +++ b/Models/Instruments/MCDU2/INITA/INITBOX.ac @@ -3,9 +3,9 @@ MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 0 0 0 shi 128 trans MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 1 1 1 spec 0 0 0 shi 128 trans 0 MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 0 trans 0 OBJECT world -kids 5 +kids 6 OBJECT poly -name "fromto" +name "fromtobox" loc -0.0691401 -0.000598909 -0.016447 data 10 enginepane @@ -212,7 +212,7 @@ refs 4 1 0.847897 0.937924 kids 0 OBJECT poly -name "coroute" +name "coroutebox" loc -0.0690906 -0.00060165 0.00956676 data 10 enginepane @@ -233,28 +233,7 @@ refs 4 2 0.00547499 0.697977 kids 0 OBJECT poly -name "face" -loc -0.0925569 -0.0235122 0.00196775 -data 10 -enginepane -texture "amberbox.png" -crease 30.000002 -numvert 4 --0.000122987 0 0.028218 -0.00643683 1.49012e-008 0.028218 -0.00643683 1.49012e-008 -0.00762965 --0.000122987 0 -0.00762965 -numsurf 1 -SURF 0x0 -mat 2 -refs 4 -3 0.634683 0.490563 -0 4.45843e-005 0.490563 -1 4.45843e-005 0.000756443 -2 0.634683 0.000756443 -kids 0 -OBJECT poly -name "fltnum" +name "fltnumbox" loc -0.055732 -0.00059823 0.0550418 data 10 enginepane @@ -274,3 +253,45 @@ refs 4 2 0.986171 0.15482 1 0.986171 0.346666 kids 0 +OBJECT poly +name "cruisetempbox" +loc -0.023689 -0.000601875 0.0120288 +data 10 +enginepane +texture "amberbox.png" +crease 30.000002 +numvert 4 +0.00300897 4.30737e-009 0.00540834 +0.00300897 4.30737e-009 0.0335519 +0.00743973 1.02445e-008 0.00540834 +0.00743973 1.02445e-008 0.0335519 +numsurf 1 +SURF 0x0 +mat 2 +refs 4 +2 0.425175 0.153011 +0 0.425175 0.348573 +1 0.0378401 0.348573 +3 0.0378401 0.153011 +kids 0 +OBJECT poly +name "costindexbox" +loc -0.0341378 -0.000601875 0.0443633 +data 10 +enginepane +texture "amberbox.png" +crease 30.000002 +numvert 4 +0.00302765 4.36557e-009 0.00121848 +0.00302765 4.36557e-009 -0.00862511 +0.00747692 1.03028e-008 -0.00862511 +0.00747692 1.03028e-008 0.00121848 +numsurf 1 +SURF 0x0 +mat 2 +refs 4 +0 0.48284 0.347748 +3 0.48284 0.151369 +2 0.618316 0.151369 +1 0.618316 0.347748 +kids 0 diff --git a/Models/Instruments/MCDU2/INITA/INITBOX.xml b/Models/Instruments/MCDU2/INITA/INITBOX.xml index 97fc8370..dc19f5d4 100644 --- a/Models/Instruments/MCDU2/INITA/INITBOX.xml +++ b/Models/Instruments/MCDU2/INITA/INITBOX.xml @@ -10,4 +10,42 @@ INITBOX.ac + + select + fromtobox + + /FMGC/internal/tofrom-set + + + + + select + costindexbox + + + /FMGC/internal/tofrom-set + /FMGC/internal/cost-index-set + + + + + + select + cruisetempbox + + + /FMGC/internal/tofrom-set + /FMGC/internal/cruise-lvl-set + + + + + + select + fltnumbox + + /MCDUC/flight-num-set + + + diff --git a/Models/Instruments/MCDU2/MCDU2.xml b/Models/Instruments/MCDU2/MCDU2.xml index 3946d9a5..aee1f004 100644 --- a/Models/Instruments/MCDU2/MCDU2.xml +++ b/Models/Instruments/MCDU2/MCDU2.xml @@ -20,7 +20,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -37,7 +37,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -59,7 +59,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -81,7 +81,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -103,7 +103,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -125,7 +125,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -147,7 +147,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -169,7 +169,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -191,7 +191,7 @@ - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -207,13 +207,13 @@ init - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -226,13 +226,13 @@ data - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -245,13 +245,13 @@ perf - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -264,13 +264,13 @@ L1 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -282,13 +282,13 @@ L2 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -300,13 +300,13 @@ L3 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -318,13 +318,13 @@ L4 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -336,13 +336,13 @@ L5 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -354,13 +354,13 @@ L6 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -373,13 +373,13 @@ R1 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -391,13 +391,13 @@ R2 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -409,13 +409,13 @@ R3 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -427,13 +427,13 @@ R4 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -445,13 +445,13 @@ R5 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -463,13 +463,13 @@ R6 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -482,13 +482,13 @@ left - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -500,13 +500,13 @@ right - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -518,13 +518,13 @@ up - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -536,13 +536,13 @@ down - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -555,13 +555,13 @@ a - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -573,13 +573,13 @@ b - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -591,13 +591,13 @@ c - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -609,13 +609,13 @@ d - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -627,13 +627,13 @@ e - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -645,13 +645,13 @@ f - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -663,13 +663,13 @@ g - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -681,13 +681,13 @@ h - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -699,13 +699,13 @@ i - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -717,13 +717,13 @@ j - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -735,13 +735,13 @@ k - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -753,13 +753,13 @@ l - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -771,13 +771,13 @@ m - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -789,13 +789,13 @@ n - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -807,13 +807,13 @@ o - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -825,13 +825,13 @@ p - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -843,13 +843,13 @@ q - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -861,13 +861,13 @@ r - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -879,13 +879,13 @@ s - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -897,13 +897,13 @@ t - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -915,13 +915,13 @@ u - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -933,13 +933,13 @@ v - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -951,13 +951,13 @@ w - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -969,13 +969,13 @@ x - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -987,13 +987,13 @@ y - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1005,13 +1005,13 @@ z - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1023,13 +1023,13 @@ / - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1041,13 +1041,13 @@ sp - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1059,13 +1059,13 @@ overfly - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1077,13 +1077,13 @@ clr - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1095,13 +1095,13 @@ 0 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1113,13 +1113,13 @@ 1 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1131,13 +1131,13 @@ 2 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1149,13 +1149,13 @@ 3 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1167,13 +1167,13 @@ 4 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1185,13 +1185,13 @@ 5 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1203,13 +1203,13 @@ 6 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1221,13 +1221,13 @@ 7 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1239,13 +1239,13 @@ 8 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1257,13 +1257,13 @@ 9 - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 @@ -1275,36 +1275,36 @@ . - false + true nasal - /systems/electrical/bus/ac1 + /systems/electrical/bus/ac2 25 - + diff --git a/Nasal/ADIRS.nas b/Nasal/ADIRS.nas index b4826b66..4738bd50 100644 --- a/Nasal/ADIRS.nas +++ b/Nasal/ADIRS.nas @@ -16,40 +16,42 @@ setprop("/systems/electrical/bus/ac-ess", 0); var adirs_init = func { setprop("controls/adirs/skip",0); #define this here, as we want this to be off on startup + setprop("/controls/adirs/mcducbtn",0); adirs_timer.start(); } var ADIRSreset = func { setprop("/controls/adirs/numm", 0); - setprop("instrumentation/adirs/ir[0]/aligned",0); - setprop("instrumentation/adirs/ir[1]/aligned",0); - setprop("instrumentation/adirs/ir[2]/aligned",0); - setprop("instrumentation/adirs/ir[0]/display/ttn",0); - setprop("instrumentation/adirs/ir[1]/display/ttn",0); - setprop("instrumentation/adirs/ir[2]/display/ttn",0); - setprop("instrumentation/adirs/ir[0]/display/status","- - - - - - - - "); - setprop("instrumentation/adirs/ir[1]/display/status","- - - - - - - - "); - setprop("instrumentation/adirs/ir[2]/display/status","- - - - - - - - "); - setprop("controls/adirs/adr[0]/fault",0); - setprop("controls/adirs/adr[1]/fault",0); - setprop("controls/adirs/adr[2]/fault",0); - setprop("controls/adirs/adr[0]/off",0); - setprop("controls/adirs/adr[1]/off",0); - setprop("controls/adirs/adr[2]/off",0); - setprop("controls/adirs/display/text",""); - setprop("controls/adirs/display/dataknob","5"); - setprop("controls/adirs/display/selected","1"); - setprop("controls/adirs/ir[0]/align",0); - setprop("controls/adirs/ir[1]/align",0); - setprop("controls/adirs/ir[2]/align",0); - setprop("controls/adirs/ir[0]/knob","0"); - setprop("controls/adirs/ir[1]/knob","0"); - setprop("controls/adirs/ir[2]/knob","0"); - setprop("controls/adirs/ir[0]/fault",0); - setprop("controls/adirs/ir[1]/fault",0); - setprop("controls/adirs/ir[2]/fault",0); - setprop("controls/adirs/onbat",0); - setprop("controls/adirs/skip",0); + setprop("/instrumentation/adirs/ir[0]/aligned",0); + setprop("/instrumentation/adirs/ir[1]/aligned",0); + setprop("/instrumentation/adirs/ir[2]/aligned",0); + setprop("/instrumentation/adirs/ir[0]/display/ttn",0); + setprop("/instrumentation/adirs/ir[1]/display/ttn",0); + setprop("/instrumentation/adirs/ir[2]/display/ttn",0); + setprop("/instrumentation/adirs/ir[0]/display/status","- - - - - - - - "); + setprop("/instrumentation/adirs/ir[1]/display/status","- - - - - - - - "); + setprop("/instrumentation/adirs/ir[2]/display/status","- - - - - - - - "); + setprop("/controls/adirs/adr[0]/fault",0); + setprop("/controls/adirs/adr[1]/fault",0); + setprop("/controls/adirs/adr[2]/fault",0); + setprop("/controls/adirs/adr[0]/off",0); + setprop("/controls/adirs/adr[1]/off",0); + setprop("/controls/adirs/adr[2]/off",0); + setprop("/controls/adirs/display/text",""); + setprop("/controls/adirs/display/dataknob","5"); + setprop("/controls/adirs/display/selected","1"); + setprop("/controls/adirs/ir[0]/align",0); + setprop("/controls/adirs/ir[1]/align",0); + setprop("/controls/adirs/ir[2]/align",0); + setprop("/controls/adirs/ir[0]/knob","0"); + setprop("/controls/adirs/ir[1]/knob","0"); + setprop("/controls/adirs/ir[2]/knob","0"); + setprop("/controls/adirs/ir[0]/fault",0); + setprop("/controls/adirs/ir[1]/fault",0); + setprop("/controls/adirs/ir[2]/fault",0); + setprop("/controls/adirs/onbat",0); + setprop("/controls/adirs/skip",0); + setprop("/controls/adirs/mcducbtn",0); adirs_init(); } @@ -137,9 +139,24 @@ var ir_knob_move = func(i) { } } -setlistener("/controls/adirs/ir[0]/knob", func { ir_knob_move(0) }); -setlistener("/controls/adirs/ir[1]/knob", func { ir_knob_move(1) }); -setlistener("/controls/adirs/ir[2]/knob", func { ir_knob_move(2) }); +setlistener("/controls/adirs/ir[0]/knob", func { + ir_knob_move(0); + knobmcducheck(); +}); +setlistener("/controls/adirs/ir[1]/knob", func { + ir_knob_move(1); + knobmcducheck(); +}); +setlistener("/controls/adirs/ir[2]/knob", func { + ir_knob_move(2); + knobmcducheck(); +}); + +var knobmcducheck = func { + if (getprop("/controls/adirs/ir[0]/knob") == 1 and getprop("/controls/adirs/ir[1]/knob") == 1 and getprop("/controls/adirs/ir[2]/knob") == 1) { + setprop("/controls/adirs/mcducbtn", 0); + } +} var onbat_light = func { if (((getprop("/systems/electrical/bus/dc1") > 25) or (getprop("/systems/electrical/bus/dc2") > 25)) and @@ -155,14 +172,9 @@ var onbat_light = func { var onbat_light_b = func { setprop("/controls/adirs/onbat", 1); - setprop("/controls/adirs/numm", 0); - interpolate("/controls/adirs/numm", 5, 7); - var nummlist = setlistener("/controls/adirs/numm", func { - if (getprop("/controls/adirs/numm") == 5) { - removelistener(nummlist); - onbat_light(); - } - }); + settimer(func { + onbat_light(); + }, 4); if (getprop("/controls/adirs/skip") == 1) { skip_ADIRS(); } diff --git a/Nasal/FMGC.nas b/Nasal/FMGC.nas index d66ece78..538cc18e 100644 --- a/Nasal/FMGC.nas +++ b/Nasal/FMGC.nas @@ -46,6 +46,21 @@ var flarecheck = func { } } +############### +# MCDU Inputs # +############### + +var updateARPT = func { + var dep = getprop("/FMGC/internal/dep-arpt"); + var arr = getprop("/FMGC/internal/arr-arpt"); + setprop("/autopilot/route-manager/departure/airport", dep); + setprop("/autopilot/route-manager/destination/airport", arr); +} + +setlistener("/FMGC/internal/cruise-ft", func { + setprop("/autopilot/route-manager/cruise/altitude-ft", getprop("/FMGC/internal/cruise-ft")); +}); + ################ # Flight Phase # ################ diff --git a/Nasal/MCDU1.nas b/Nasal/MCDU1.nas index 04c938a2..bbca2f14 100644 --- a/Nasal/MCDU1.nas +++ b/Nasal/MCDU1.nas @@ -1,5 +1,5 @@ ################################################################## -# A3XX MCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath # +# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath # ################################################################## var MCDU_init = func { @@ -9,9 +9,15 @@ var MCDU_init = func { var MCDU_reset = func { setprop("/MCDU[0]/page", "STATUS"); - setprop("/MCDU[0]/cost-index", 0); - setprop("/MCDU[0]/flight-num", 0); setprop("/MCDU[0]/scratchpad", ""); + setprop("/MCDUC/flight-num", ""); + setprop("/MCDUC/flight-num-set", 0); + setprop("/FMGC/internal/dep-arpt", ""); + setprop("/FMGC/internal/arr-arpt", ""); + setprop("/FMGC/internal/tofrom-set", 0); + setprop("/FMGC/internal/cruise-ft", 10000); + setprop("/FMGC/internal/cruise-fl", 100); + setprop("/FMGC/internal/cost-index", "0"); setprop("/FMGC/internal/cost-index-set", 0); setprop("/FMGC/internal/cruise-lvl-set", 0); } @@ -21,6 +27,10 @@ var lskbutton = func(btn) { if (getprop("/MCDU[0]/page") == "INITA") { PerfInput("L2"); } + } else if (btn == "3") { + if (getprop("/MCDU[0]/page") == "INITA") { + initInputA("L3"); + } } else if (btn == "4") { if (getprop("/MCDU[0]/page") == "DATA") { setprop("/MCDU[0]/page", "STATUS"); @@ -41,11 +51,45 @@ var lskbutton = func(btn) { } } } - + +var rskbutton = func(btn) { + if (btn == "1") { + if (getprop("/MCDU[0]/page") == "INITA") { + initInputA("R1"); + } + } else if (btn == "3") { + if (getprop("/MCDU[0]/page") == "INITA") { + initInputA("R3"); + } + } else if (btn == "6") { + if (getprop("/MCDU[0]/page") == "TO") { + PerfTOInput("R6"); + } else if (getprop("/MCDU[0]/page") == "CLB") { + perfCLBInput("R6"); + } # else if (getprop("/MCDU[0]/page") == "CRZ") { + # perfCRZInput("R6"); + #} + } +} var initInputA = func(key) { var scratchpad = getprop("/MCDU[0]/scratchpad"); - if (key == "L5") { + if (key == "L3") { + if (scratchpad == "CLR") { + setprop("/MCDUC/flight-num", ""); + setprop("/MCDUC/flight-num-set", 0); + setprop("/MCDU[0]/scratchpad", ""); + } else { + var flts = size(scratchpad); + if (flts >= 1 and flts <= 8) { + setprop("/MCDUC/flight-num", scratchpad); + setprop("/MCDUC/flight-num-set", 1); + setprop("/MCDU[0]/scratchpad", ""); + } else { + setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); + } + } + } else if (key == "L5") { if (scratchpad == "CLR") { setprop("/FMGC/internal/cost-index", 0); setprop("/FMGC/internal/cost-index-set", 0); @@ -54,7 +98,9 @@ var initInputA = func(key) { var ci = int(scratchpad); var cis = size(scratchpad); if (cis >= 1 and cis <= 3) { - if (cis >= 0 and cis <= 120) { + if (ci == nil) { + setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[0]/scratchpad", ""); @@ -75,7 +121,9 @@ var initInputA = func(key) { var crz = int(scratchpad); var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3) { - if (crz > 0 and crz <= 430) { + if (crz == nil) { + setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); + } else if (crz > 0 and crz <= 430) { setprop("/FMGC/internal/cruise-ft", crz * 100); setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-lvl-set", 1); @@ -87,6 +135,30 @@ var initInputA = func(key) { setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); } } + } else if (key == "R1") { + if (scratchpad == "CLR") { + setprop("/FMGC/internal/dep-arpt", ""); + setprop("/FMGC/internal/arr-arpt", ""); + setprop("/FMGC/internal/tofrom-set", 0); + fmgc.updateARPT(); + setprop("/MCDU[0]/scratchpad", ""); + } else { + var tfs = size(scratchpad); + if (tfs == 9) { + var fromto = split("/", scratchpad); + setprop("/FMGC/internal/dep-arpt", fromto[0]); + setprop("/FMGC/internal/arr-arpt", fromto[1]); + setprop("/FMGC/internal/tofrom-set", 1); + fmgc.updateARPT(); + setprop("/MCDU[0]/scratchpad", ""); + } else { + setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); + } + } + } else if (key == "R3") { + if (getprop("/controls/adirs/mcducbtn") == 0) { + setprop("/controls/adirs/mcducbtn", 1); + } } } @@ -101,7 +173,9 @@ var perfCLBInput = func(key) { var ci = int(scratchpad); var cis = size(scratchpad); if (cis >= 1 and cis <= 3) { - if (cis >= 0 and cis <= 120) { + if (ci == nil) { + setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[0]/scratchpad", ""); @@ -134,18 +208,6 @@ var perfCRZInput = func(key) { # } } -var rskbutton = func(btn) { - if (btn == "6") { - if (getprop("/MCDU[0]/page") == "TO") { - PerfTOInput("R6"); - } else if (getprop("/MCDU[0]/page") == "CLB") { - perfCLBInput("R6"); - } # else if (getprop("/MCDU[0]/page") == "CRZ") { - # perfCRZInput("R6"); - #} - } -} - var arrowbutton = func(btn) { if (btn == "left") { if (getprop("/MCDU[0]/page") == "DATA") { @@ -279,6 +341,8 @@ var button = func(btn) { setprop("/MCDU[0]/scratchpad", scratchpad ~ "9"); } else if (btn == "DOT") { setprop("/MCDU[0]/scratchpad", scratchpad ~ "."); + } else if (btn == "PLUSMINUS") { + setprop("/MCDU[0]/scratchpad", scratchpad ~ "-"); } } diff --git a/Nasal/MCDU2.nas b/Nasal/MCDU2.nas index 88e4cc35..bc1dd4d5 100644 --- a/Nasal/MCDU2.nas +++ b/Nasal/MCDU2.nas @@ -1,5 +1,5 @@ ################################################################## -# A3XX MCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath # +# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath # ################################################################## var MCDU_init = func { @@ -9,9 +9,15 @@ var MCDU_init = func { var MCDU_reset = func { setprop("/MCDU[1]/page", "STATUS"); - setprop("/MCDU[1]/cost-index", 0); - setprop("/MCDU[1]/flight-num", 0); setprop("/MCDU[1]/scratchpad", ""); + setprop("/MCDUC/flight-num", ""); + setprop("/MCDUC/flight-num-set", 0); + setprop("/FMGC/internal/dep-arpt", ""); + setprop("/FMGC/internal/arr-arpt", ""); + setprop("/FMGC/internal/tofrom-set", 0); + setprop("/FMGC/internal/cruise-ft", 10000); + setprop("/FMGC/internal/cruise-fl", 100); + setprop("/FMGC/internal/cost-index", "0"); setprop("/FMGC/internal/cost-index-set", 0); setprop("/FMGC/internal/cruise-lvl-set", 0); } @@ -21,6 +27,10 @@ var lskbutton = func(btn) { if (getprop("/MCDU[1]/page") == "INITA") { PerfInput("L2"); } + } else if (btn == "3") { + if (getprop("/MCDU[1]/page") == "INITA") { + initInputA("L3"); + } } else if (btn == "4") { if (getprop("/MCDU[1]/page") == "DATA") { setprop("/MCDU[1]/page", "STATUS"); @@ -42,9 +52,44 @@ var lskbutton = func(btn) { } } +var rskbutton = func(btn) { + if (btn == "1") { + if (getprop("/MCDU[1]/page") == "INITA") { + initInputA("R1"); + } + } else if (btn == "3") { + if (getprop("/MCDU[1]/page") == "INITA") { + initInputA("R3"); + } + } else if (btn == "6") { + if (getprop("/MCDU[1]/page") == "TO") { + PerfTOInput("R6"); + } else if (getprop("/MCDU[1]/page") == "CLB") { + perfCLBInput("R6"); + } # else if (getprop("/MCDU[1]/page") == "CRZ") { + # perfCRZInput("R6"); + #} + } +} + var initInputA = func(key) { var scratchpad = getprop("/MCDU[1]/scratchpad"); - if (key == "L5") { + if (key == "L3") { + if (scratchpad == "CLR") { + setprop("/MCDUC/flight-num", ""); + setprop("/MCDUC/flight-num-set", 0); + setprop("/MCDU[1]/scratchpad", ""); + } else { + var flts = size(scratchpad); + if (flts >= 1 and flts <= 8) { + setprop("/MCDUC/flight-num", scratchpad); + setprop("/MCDUC/flight-num-set", 1); + setprop("/MCDU[1]/scratchpad", ""); + } else { + setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); + } + } + } else if (key == "L5") { if (scratchpad == "CLR") { setprop("/FMGC/internal/cost-index", 0); setprop("/FMGC/internal/cost-index-set", 0); @@ -53,7 +98,9 @@ var initInputA = func(key) { var ci = int(scratchpad); var cis = size(scratchpad); if (cis >= 1 and cis <= 3) { - if (cis >= 0 and cis <= 120) { + if (ci == nil) { + setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[1]/scratchpad", ""); @@ -74,7 +121,9 @@ var initInputA = func(key) { var crz = int(scratchpad); var crzs = size(scratchpad); if (crzs >= 1 and crzs <= 3) { - if (crz > 0 and crz <= 430) { + if (crz == nil) { + setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); + } else if (crz > 0 and crz <= 430) { setprop("/FMGC/internal/cruise-ft", crz * 100); setprop("/FMGC/internal/cruise-fl", crz); setprop("/FMGC/internal/cruise-lvl-set", 1); @@ -86,6 +135,30 @@ var initInputA = func(key) { setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); } } + } else if (key == "R1") { + if (scratchpad == "CLR") { + setprop("/FMGC/internal/dep-arpt", ""); + setprop("/FMGC/internal/arr-arpt", ""); + setprop("/FMGC/internal/tofrom-set", 0); + fmgc.updateARPT(); + setprop("/MCDU[1]/scratchpad", ""); + } else { + var tfs = size(scratchpad); + if (tfs == 9) { + var fromto = split("/", scratchpad); + setprop("/FMGC/internal/dep-arpt", fromto[0]); + setprop("/FMGC/internal/arr-arpt", fromto[1]); + setprop("/FMGC/internal/tofrom-set", 1); + fmgc.updateARPT(); + setprop("/MCDU[1]/scratchpad", ""); + } else { + setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); + } + } + } else if (key == "R3") { + if (getprop("/controls/adirs/mcducbtn") == 0) { + setprop("/controls/adirs/mcducbtn", 1); + } } } @@ -100,7 +173,9 @@ var perfCLBInput = func(key) { var ci = int(scratchpad); var cis = size(scratchpad); if (cis >= 1 and cis <= 3) { - if (cis >= 0 and cis <= 120) { + if (ci == nil) { + setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); + } else if (ci >= 0 and ci <= 120) { setprop("/FMGC/internal/cost-index", ci); setprop("/FMGC/internal/cost-index-set", 1); setprop("/MCDU[1]/scratchpad", ""); @@ -127,21 +202,10 @@ var PerfTOInput = func(key) { var perfCRZInput = func(key) { if (key == "L6") { setprop("/MCDU[1]/page", "CLB"); - } # else if (key == "R6") { - # setprop("/MCDU[1]/page", "DES"); - #} -} - -var rskbutton = func(btn) { - if (btn == "6") { - if (getprop("/MCDU[1]/page") == "TO") { - PerfTOInput("R6"); - } else if (getprop("/MCDU[1]/page") == "CLB") { - perfCLBInput("R6"); - } # else if (getprop("/MCDU[1]/page") == "TO") { - # perfCRZInput("R6"); - # } } + # if (key == "R6") { + # setprop("/MCDU[1]/page", "DES"); + # } } var arrowbutton = func(btn) { @@ -277,6 +341,8 @@ var button = func(btn) { setprop("/MCDU[1]/scratchpad", scratchpad ~ "9"); } else if (btn == "DOT") { setprop("/MCDU[1]/scratchpad", scratchpad ~ "."); + } else if (btn == "PLUSMINUS") { + setprop("/MCDU[1]/scratchpad", scratchpad ~ "-"); } }