Major MCDU Update, more INITA works, can program route manager, fix various issues, improvements

This commit is contained in:
Joshua Davidson 2017-05-21 13:20:14 -04:00
parent 316c5f8ace
commit cb9cdc6905
14 changed files with 755 additions and 364 deletions

View file

@ -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 {

View file

@ -95,20 +95,20 @@
</font-resolution>
</text>
<!--<text>
<text>
<name>fromto2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.035</y-m>
<y-m>0.028</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>left-center</alignment>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>REPLACE ME WITH SOMETHING</property>
<property>/FMGC/internal/dep-arpt</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -117,7 +117,39 @@
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>-->
</text>
<text>
<name>fromto2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.043</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">/%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/arr-arpt</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>fromto2</object-name>
<condition>
<property>/FMGC/internal/tofrom-set</property>
</condition>
</animation>
<text>
<name>altncorte</name>
@ -282,6 +314,19 @@
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>alignirs</object-name>
<object-name>alignirs-arrow</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/controls/adirs/mcducbtn</property></not>
</and>
</condition>
</animation>
<!--<text>
<name>activedata3</name>
<offsets>
@ -329,29 +374,37 @@
<height type="int">64</height>
</font-resolution>
</text>
<!--<text>
<text>
<name>fltnmbr2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.035</y-m>
<y-m>-0.045</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">N/A</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>/MCDUC/flight-num</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0045</character-size>
<character-size>0.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>-->
</text>
<animation>
<type>select</type>
<object-name>fltnmbr2</object-name>
<condition>
<property>/MCDUC/flight-num-set</property>
</condition>
</animation>
<text>
<name>costindex</name>
@ -427,6 +480,7 @@
<type>select</type>
<object-name>costindex2</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
@ -582,6 +636,7 @@
<type>select</type>
<object-name>crzfltemp2</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
<not><property>/FMGC/internal/cruise-lvl-set</property></not>
</condition>
</animation>
@ -839,6 +894,8 @@
<object-name>tropovalue</object-name>
<object-name>LONG-val</object-name>
<object-name>LAT-val</object-name>
<object-name>fromto2</object-name>
<object-name>fltnmbr2</object-name>
<object-name>costindex3</object-name>
<object-name>crzfltemp3</object-name>
<diffuse>

View file

@ -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

View file

@ -10,4 +10,42 @@
<path>INITBOX.ac</path>
<animation>
<type>select</type>
<object-name>fromtobox</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>costindexbox</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/FMGC/internal/cost-index-set</property></not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>cruisetempbox</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/FMGC/internal/cruise-lvl-set</property></not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>fltnumbox</object-name>
<condition>
<not><property>/MCDUC/flight-num-set</property></not>
</condition>
</animation>
</PropertyList>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -207,7 +207,7 @@
<object-name>init</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("init");</script>
@ -226,7 +226,7 @@
<object-name>data</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("data");</script>
@ -245,7 +245,7 @@
<object-name>perf</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("perf");</script>
@ -264,7 +264,7 @@
<object-name>L1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("1");</script>
@ -282,7 +282,7 @@
<object-name>L2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("2");</script>
@ -300,7 +300,7 @@
<object-name>L3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("3");</script>
@ -318,7 +318,7 @@
<object-name>L4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("4");</script>
@ -336,7 +336,7 @@
<object-name>L5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("5");</script>
@ -354,7 +354,7 @@
<object-name>L6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("6");</script>
@ -373,7 +373,7 @@
<object-name>R1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("1");</script>
@ -391,7 +391,7 @@
<object-name>R2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("2");</script>
@ -409,7 +409,7 @@
<object-name>R3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("3");</script>
@ -427,7 +427,7 @@
<object-name>R4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("4");</script>
@ -445,7 +445,7 @@
<object-name>R5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("5");</script>
@ -463,7 +463,7 @@
<object-name>R6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("6");</script>
@ -482,7 +482,7 @@
<object-name>left</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("left");</script>
@ -500,7 +500,7 @@
<object-name>right</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("right");</script>
@ -518,7 +518,7 @@
<object-name>up</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("up");</script>
@ -536,7 +536,7 @@
<object-name>down</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("down");</script>
@ -555,7 +555,7 @@
<object-name>a</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("A");</script>
@ -573,7 +573,7 @@
<object-name>b</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("B");</script>
@ -591,7 +591,7 @@
<object-name>c</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("C");</script>
@ -609,7 +609,7 @@
<object-name>d</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("D");</script>
@ -627,7 +627,7 @@
<object-name>e</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("E");</script>
@ -645,7 +645,7 @@
<object-name>f</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("F");</script>
@ -663,7 +663,7 @@
<object-name>g</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("G");</script>
@ -681,7 +681,7 @@
<object-name>h</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("H");</script>
@ -699,7 +699,7 @@
<object-name>i</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("I");</script>
@ -717,7 +717,7 @@
<object-name>j</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("J");</script>
@ -735,7 +735,7 @@
<object-name>k</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("K");</script>
@ -753,7 +753,7 @@
<object-name>l</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("L");</script>
@ -771,7 +771,7 @@
<object-name>m</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("M");</script>
@ -789,7 +789,7 @@
<object-name>n</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("N");</script>
@ -807,7 +807,7 @@
<object-name>o</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("O");</script>
@ -825,7 +825,7 @@
<object-name>p</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("P");</script>
@ -843,7 +843,7 @@
<object-name>q</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Q");</script>
@ -861,7 +861,7 @@
<object-name>r</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("R");</script>
@ -879,7 +879,7 @@
<object-name>s</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("S");</script>
@ -897,7 +897,7 @@
<object-name>t</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("T");</script>
@ -915,7 +915,7 @@
<object-name>u</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("U");</script>
@ -933,7 +933,7 @@
<object-name>v</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("V");</script>
@ -951,7 +951,7 @@
<object-name>w</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("W");</script>
@ -969,7 +969,7 @@
<object-name>x</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("X");</script>
@ -987,7 +987,7 @@
<object-name>y</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Y");</script>
@ -1005,7 +1005,7 @@
<object-name>z</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Z");</script>
@ -1023,7 +1023,7 @@
<object-name>/</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("SLASH");</script>
@ -1041,7 +1041,7 @@
<object-name>sp</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("SP");</script>
@ -1059,7 +1059,7 @@
<object-name>overfly</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("OVFY");</script>
@ -1077,7 +1077,7 @@
<object-name>clr</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("CLR");</script>
@ -1095,7 +1095,7 @@
<object-name>0</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("0");</script>
@ -1113,7 +1113,7 @@
<object-name>1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("1");</script>
@ -1131,7 +1131,7 @@
<object-name>2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("2");</script>
@ -1149,7 +1149,7 @@
<object-name>3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("3");</script>
@ -1167,7 +1167,7 @@
<object-name>4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("4");</script>
@ -1185,7 +1185,7 @@
<object-name>5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("5");</script>
@ -1203,7 +1203,7 @@
<object-name>6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("6");</script>
@ -1221,7 +1221,7 @@
<object-name>7</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("7");</script>
@ -1239,7 +1239,7 @@
<object-name>8</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("8");</script>
@ -1257,7 +1257,7 @@
<object-name>9</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("9");</script>
@ -1275,7 +1275,7 @@
<object-name>.</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("DOT");</script>
@ -1288,12 +1288,12 @@
</binding>
</action>
</animation>
<!--animation>
<animation>
<type>pick</type>
<object-name>+/-</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("PLUSMINUS");</script>
@ -1305,6 +1305,6 @@
</condition>
</binding>
</action>
</animation-->
</animation>
</PropertyList>

View file

@ -95,20 +95,20 @@
</font-resolution>
</text>
<!--<text>
<text>
<name>fromto2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.035</y-m>
<y-m>0.028</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>left-center</alignment>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>REPLACE ME WITH SOMETHING</property>
<property>/FMGC/internal/dep-arpt</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
@ -117,7 +117,39 @@
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>-->
</text>
<text>
<name>fromto2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>0.043</y-m>
<z-m>0.0715</z-m>
</offsets>
<alignment>right-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">/%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>/FMGC/internal/arr-arpt</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>fromto2</object-name>
<condition>
<property>/FMGC/internal/tofrom-set</property>
</condition>
</animation>
<text>
<name>altncorte</name>
@ -282,6 +314,19 @@
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>alignirs</object-name>
<object-name>alignirs-arrow</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/controls/adirs/mcducbtn</property></not>
</and>
</condition>
</animation>
<!--<text>
<name>activedata3</name>
<offsets>
@ -329,29 +374,37 @@
<height type="int">64</height>
</font-resolution>
</text>
<!--<text>
<text>
<name>fltnmbr2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.035</y-m>
<y-m>-0.045</y-m>
<z-m>0.0505</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">N/A</format>
<format type="string">%s</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<property>/MCDUC/flight-num</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0045</character-size>
<character-size>0.0050</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>-->
</text>
<animation>
<type>select</type>
<object-name>fltnmbr2</object-name>
<condition>
<property>/MCDUC/flight-num-set</property>
</condition>
</animation>
<text>
<name>costindex</name>
@ -427,6 +480,7 @@
<type>select</type>
<object-name>costindex2</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
@ -582,6 +636,7 @@
<type>select</type>
<object-name>crzfltemp2</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
<not><property>/FMGC/internal/cruise-lvl-set</property></not>
</condition>
</animation>
@ -839,6 +894,9 @@
<object-name>tropovalue</object-name>
<object-name>LONG-val</object-name>
<object-name>LAT-val</object-name>
<object-name>fromto2</object-name>
<object-name>fltnmbr2</object-name>
<object-name>costindex3</object-name>
<object-name>crzfltemp3</object-name>
<diffuse>
<red>0</red>

View file

@ -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

View file

@ -10,4 +10,42 @@
<path>INITBOX.ac</path>
<animation>
<type>select</type>
<object-name>fromtobox</object-name>
<condition>
<not><property>/FMGC/internal/tofrom-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>costindexbox</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/FMGC/internal/cost-index-set</property></not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>cruisetempbox</object-name>
<condition>
<and>
<property>/FMGC/internal/tofrom-set</property>
<not><property>/FMGC/internal/cruise-lvl-set</property></not>
</and>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>fltnumbox</object-name>
<condition>
<not><property>/MCDUC/flight-num-set</property></not>
</condition>
</animation>
</PropertyList>

View file

@ -20,7 +20,7 @@
</offsets>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -37,7 +37,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -59,7 +59,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -81,7 +81,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -103,7 +103,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -125,7 +125,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -147,7 +147,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -169,7 +169,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -191,7 +191,7 @@
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
<equals>
@ -207,13 +207,13 @@
<object-name>init</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("init");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -226,13 +226,13 @@
<object-name>data</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("data");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -245,13 +245,13 @@
<object-name>perf</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("perf");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -264,13 +264,13 @@
<object-name>L1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("1");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -282,13 +282,13 @@
<object-name>L2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("2");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -300,13 +300,13 @@
<object-name>L3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("3");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -318,13 +318,13 @@
<object-name>L4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("4");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -336,13 +336,13 @@
<object-name>L5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("5");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -354,13 +354,13 @@
<object-name>L6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("6");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -373,13 +373,13 @@
<object-name>R1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("1");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -391,13 +391,13 @@
<object-name>R2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("2");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -409,13 +409,13 @@
<object-name>R3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("3");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -427,13 +427,13 @@
<object-name>R4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("4");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -445,13 +445,13 @@
<object-name>R5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("5");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -463,13 +463,13 @@
<object-name>R6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("6");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -482,13 +482,13 @@
<object-name>left</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("left");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -500,13 +500,13 @@
<object-name>right</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("right");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -518,13 +518,13 @@
<object-name>up</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("up");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -536,13 +536,13 @@
<object-name>down</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("down");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -555,13 +555,13 @@
<object-name>a</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("A");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -573,13 +573,13 @@
<object-name>b</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("B");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -591,13 +591,13 @@
<object-name>c</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("C");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -609,13 +609,13 @@
<object-name>d</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("D");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -627,13 +627,13 @@
<object-name>e</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("E");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -645,13 +645,13 @@
<object-name>f</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("F");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -663,13 +663,13 @@
<object-name>g</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("G");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -681,13 +681,13 @@
<object-name>h</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("H");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -699,13 +699,13 @@
<object-name>i</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("I");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -717,13 +717,13 @@
<object-name>j</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("J");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -735,13 +735,13 @@
<object-name>k</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("K");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -753,13 +753,13 @@
<object-name>l</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("L");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -771,13 +771,13 @@
<object-name>m</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("M");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -789,13 +789,13 @@
<object-name>n</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("N");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -807,13 +807,13 @@
<object-name>o</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("O");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -825,13 +825,13 @@
<object-name>p</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("P");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -843,13 +843,13 @@
<object-name>q</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Q");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -861,13 +861,13 @@
<object-name>r</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("R");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -879,13 +879,13 @@
<object-name>s</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("S");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -897,13 +897,13 @@
<object-name>t</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("T");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -915,13 +915,13 @@
<object-name>u</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("U");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -933,13 +933,13 @@
<object-name>v</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("V");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -951,13 +951,13 @@
<object-name>w</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("W");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -969,13 +969,13 @@
<object-name>x</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("X");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -987,13 +987,13 @@
<object-name>y</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Y");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1005,13 +1005,13 @@
<object-name>z</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Z");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1023,13 +1023,13 @@
<object-name>/</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("SLASH");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1041,13 +1041,13 @@
<object-name>sp</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("SP");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1059,13 +1059,13 @@
<object-name>overfly</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("OVFY");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1077,13 +1077,13 @@
<object-name>clr</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("CLR");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1095,13 +1095,13 @@
<object-name>0</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("0");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1113,13 +1113,13 @@
<object-name>1</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("1");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1131,13 +1131,13 @@
<object-name>2</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("2");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1149,13 +1149,13 @@
<object-name>3</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("3");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1167,13 +1167,13 @@
<object-name>4</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("4");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1185,13 +1185,13 @@
<object-name>5</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("5");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1203,13 +1203,13 @@
<object-name>6</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("6");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1221,13 +1221,13 @@
<object-name>7</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("7");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1239,13 +1239,13 @@
<object-name>8</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("8");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1257,13 +1257,13 @@
<object-name>9</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("9");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
@ -1275,36 +1275,36 @@
<object-name>.</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("DOT");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
</binding>
</action>
</animation>
<!--animation>
<animation>
<type>pick</type>
<object-name>+/-</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("PLUSMINUS");</script>
<condition>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<property>/systems/electrical/bus/ac2</property>
<value>25</value>
</greater-than-equals>
</condition>
</binding>
</action>
</animation-->
</animation>
</PropertyList>

View file

@ -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();
}

View file

@ -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 #
################

View file

@ -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 ~ "-");
}
}

View file

@ -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 ~ "-");
}
}