From cb9cdc6905f58ab133e8f5e62547f0e2ec9f2631 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Sun, 21 May 2017 13:20:14 -0400 Subject: [PATCH] Major MCDU Update, more INITA works, can program route manager, fix various issues, improvements --- AircraftConfig/acconfig.nas | 31 +-- Models/Instruments/MCDU1/INITA/INITA.xml | 79 +++++- Models/Instruments/MCDU1/INITA/INITBOX.ac | 71 ++++-- Models/Instruments/MCDU1/INITA/INITBOX.xml | 38 +++ Models/Instruments/MCDU1/INITA/amberbox.png | Bin 3577 -> 3828 bytes Models/Instruments/MCDU1/MCDU1.xml | 126 +++++----- Models/Instruments/MCDU2/INITA/INITA.xml | 80 +++++- Models/Instruments/MCDU2/INITA/INITBOX.ac | 71 ++++-- Models/Instruments/MCDU2/INITA/INITBOX.xml | 38 +++ Models/Instruments/MCDU2/MCDU2.xml | 266 ++++++++++---------- Nasal/ADIRS.nas | 92 ++++--- Nasal/FMGC.nas | 15 ++ Nasal/MCDU1.nas | 104 ++++++-- Nasal/MCDU2.nas | 108 ++++++-- 14 files changed, 755 insertions(+), 364 deletions(-) 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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Q^!-J88yH-)kD9iL0eFZgp#i@a$JGGCSMUQcK+XJif-u2e?#24dL>VLPZc0ci)R+ zOd3K(Fk_FKmXF$BCoaE3gxV8(#Swptw7;Epq1UIO;Hj~&;w`0kfKNuM{|G5H#*Nx= z``)rI0Kg6*@muA|hFyF0wPU6PbOx1AN<$d;AJbb<_{$TqE<(GsDqwD)l_U)+NRi`; z08@GsGBqr9-jEoj&1+Pm`SON%jiVs8tUX=k5&$e7+=nsehjJ(S{1^g&*D+wimEjo? zPVFXNYi;xM7(lgMW-5NXyGLR8&GhlcryG8#e3l^qc!=;*!9P$gaH{VG`-iLI(bLTB zs^|lmG0OPiG6c~vDyCBcFtFd~*|Fn)r{ouG XzNbx+GluVF?kt#HwluD~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 ~ "-"); } }