Merge branch 'FMGC' into dev

This commit is contained in:
Joshua Davidson 2018-09-05 21:08:19 -04:00
commit 9550927d69
32 changed files with 1205 additions and 2969 deletions

View file

@ -186,6 +186,35 @@
<menubar>
<default>
<menu n="3"> <!-- Force disable Route Manager dialogs, bindings are changed just in case the item is not grayed out properly -->
<item n="1">
<enabled type="bool" n="0">false</enabled>
<binding n="0">
<command n="0">nasal</command>
<script n="0">
gui.popupTip("You must use the MCDU to manage your route.");
</script>
</binding>
</item>
<item n="2">
<enabled type="bool" n="0">false</enabled>
<binding n="0">
<command n="0">nasal</command>
<script n="0">
gui.popupTip("You must use the MCDU to manage your route.");
</script>
</binding>
</item>
<item n="3">
<enabled type="bool" n="0">false</enabled>
<binding n="0">
<command n="0">nasal</command>
<script n="0">
gui.popupTip("You must use the MCDU to manage your route.");
</script>
</binding>
</item>
</menu>
<menu n="100">
<label>IDG-A32X</label>
<enabled type="bool">true</enabled>
@ -1490,32 +1519,19 @@
<file>Aircraft/IDG-A32X/Nasal/FMGC-b.nas</file>
<file>Aircraft/IDG-A32X/Nasal/FMGC-c.nas</file>
</fmgc>
<mcdu1>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/MCDU.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/F-PLNA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/INITA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/INITB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/PERFCLB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/PERFCRZ.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/PERFDES.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/PERFTO.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/RADNAV.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/DATA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU1/STATUS.nas</file>
</mcdu1>
<mcdu2>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/MCDU.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/F-PLNA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/INITA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/INITB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/PERFCLB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/PERFCRZ.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/PERFDES.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/PERFTO.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/RADNAV.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/DATA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU2/STATUS.nas</file>
</mcdu2>
<mcdu>
<file>Aircraft/IDG-A32X/Nasal/MCDU/MCDU.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/F-PLNA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/INITA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/INITB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/PERFCLB.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/PERFCRZ.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/PERFDES.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/PERFTO.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/RADNAV.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/DATA.nas</file>
<file>Aircraft/IDG-A32X/Nasal/MCDU/STATUS.nas</file>
</mcdu>
<canvas_pfd>
<file>Aircraft/IDG-A32X/Models/Instruments/PFD/PFD.nas</file>
</canvas_pfd>

View file

@ -25,7 +25,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("radnav");</script>
<script>mcdu.pagebutton("radnav", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -44,7 +44,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("init");</script>
<script>mcdu.pagebutton("init", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -63,7 +63,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("data");</script>
<script>mcdu.pagebutton("data", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -82,7 +82,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("mcdu");</script>
<script>mcdu.pagebutton("mcdu", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -101,7 +101,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("perf");</script>
<script>mcdu.pagebutton("perf", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -120,7 +120,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("f-pln");</script>
<script>mcdu.pagebutton("f-pln", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -139,7 +139,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.pagebutton("fuel-pred");</script>
<script>mcdu.pagebutton("fuel-pred", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -158,7 +158,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("1");</script>
<script>mcdu.lskbutton("1", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -172,7 +172,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("1");</script>
<script>mcdu.lskbutton_b("1", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -190,7 +190,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("2");</script>
<script>mcdu.lskbutton("2", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -204,7 +204,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("2");</script>
<script>mcdu.lskbutton_b("2", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -222,7 +222,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("3");</script>
<script>mcdu.lskbutton("3", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -236,7 +236,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("3");</script>
<script>mcdu.lskbutton_b("3", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -254,7 +254,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("4");</script>
<script>mcdu.lskbutton("4", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -268,7 +268,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("4");</script>
<script>mcdu.lskbutton_b("4", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -286,7 +286,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("5");</script>
<script>mcdu.lskbutton("5", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -300,7 +300,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("5");</script>
<script>mcdu.lskbutton_b("5", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -318,7 +318,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton("6");</script>
<script>mcdu.lskbutton("6", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -332,7 +332,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.lskbutton_b("6");</script>
<script>mcdu.lskbutton_b("6", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -351,7 +351,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("1");</script>
<script>mcdu.rskbutton("1", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -365,7 +365,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("1");</script>
<script>mcdu.rskbutton_b("1", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -383,7 +383,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("2");</script>
<script>mcdu.rskbutton("2", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -397,7 +397,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("2");</script>
<script>mcdu.rskbutton_b("2", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -415,7 +415,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("3");</script>
<script>mcdu.rskbutton("3", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -429,7 +429,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("3");</script>
<script>mcdu.rskbutton_b("3", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -447,7 +447,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("4");</script>
<script>mcdu.rskbutton("4", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -461,7 +461,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("4");</script>
<script>mcdu.rskbutton_b("4", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -479,7 +479,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("5");</script>
<script>mcdu.rskbutton("5", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -493,7 +493,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("5");</script>
<script>mcdu.rskbutton_b("5", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -511,7 +511,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton("6");</script>
<script>mcdu.rskbutton("6", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -525,7 +525,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.rskbutton_b("6");</script>
<script>mcdu.rskbutton_b("6", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -544,7 +544,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("left");</script>
<script>mcdu.arrowbutton("left", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -562,7 +562,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("right");</script>
<script>mcdu.arrowbutton("right", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -580,7 +580,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("up");</script>
<script>mcdu.arrowbutton("up", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -598,7 +598,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.arrowbutton("down");</script>
<script>mcdu.arrowbutton("down", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -617,7 +617,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("A");</script>
<script>mcdu.button("A", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -635,7 +635,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("B");</script>
<script>mcdu.button("B", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -653,7 +653,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("C");</script>
<script>mcdu.button("C", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -671,7 +671,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("D");</script>
<script>mcdu.button("D", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -689,7 +689,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("E");</script>
<script>mcdu.button("E", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -707,7 +707,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("F");</script>
<script>mcdu.button("F", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -725,7 +725,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("G");</script>
<script>mcdu.button("G", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -743,7 +743,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("H");</script>
<script>mcdu.button("H", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -761,7 +761,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("I");</script>
<script>mcdu.button("I", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -779,7 +779,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("J");</script>
<script>mcdu.button("J", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -797,7 +797,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("K");</script>
<script>mcdu.button("K", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -815,7 +815,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("L");</script>
<script>mcdu.button("L", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -833,7 +833,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("M");</script>
<script>mcdu.button("M", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -851,7 +851,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("N");</script>
<script>mcdu.button("N", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -869,7 +869,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("O");</script>
<script>mcdu.button("O", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -887,7 +887,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("P");</script>
<script>mcdu.button("P", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -905,7 +905,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Q");</script>
<script>mcdu.button("Q", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -923,7 +923,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("R");</script>
<script>mcdu.button("R", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -941,7 +941,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("S");</script>
<script>mcdu.button("S", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -959,7 +959,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("T");</script>
<script>mcdu.button("T", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -977,7 +977,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("U");</script>
<script>mcdu.button("U", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -995,7 +995,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("V");</script>
<script>mcdu.button("V", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1013,7 +1013,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("W");</script>
<script>mcdu.button("W", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1031,7 +1031,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("X");</script>
<script>mcdu.button("X", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1049,7 +1049,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Y");</script>
<script>mcdu.button("Y", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1067,7 +1067,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("Z");</script>
<script>mcdu.button("Z", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1085,7 +1085,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("SLASH");</script>
<script>mcdu.button("SLASH", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1103,7 +1103,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("SP");</script>
<script>mcdu.button("SP", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1121,7 +1121,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("OVFY");</script>
<script>mcdu.button("OVFY", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1139,7 +1139,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("CLR");</script>
<script>mcdu.button("CLR", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1157,7 +1157,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("0");</script>
<script>mcdu.button("0", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1175,7 +1175,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("1");</script>
<script>mcdu.button("1", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1193,7 +1193,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("2");</script>
<script>mcdu.button("2", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1211,7 +1211,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("3");</script>
<script>mcdu.button("3", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1229,7 +1229,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("4");</script>
<script>mcdu.button("4", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1247,7 +1247,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("5");</script>
<script>mcdu.button("5", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1265,7 +1265,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("6");</script>
<script>mcdu.button("6", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1283,7 +1283,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("7");</script>
<script>mcdu.button("7", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1301,7 +1301,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("8");</script>
<script>mcdu.button("8", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1319,7 +1319,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("9");</script>
<script>mcdu.button("9", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1337,7 +1337,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("DOT");</script>
<script>mcdu.button("DOT", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>
@ -1355,7 +1355,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu1.button("PLUSMINUS");</script>
<script>mcdu.button("PLUSMINUS", 0);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac1</property>

View file

@ -25,7 +25,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("radnav");</script>
<script>mcdu.pagebutton("radnav", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -44,7 +44,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("init");</script>
<script>mcdu.pagebutton("init", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -63,7 +63,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("data");</script>
<script>mcdu.pagebutton("data", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -82,7 +82,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("mcdu");</script>
<script>mcdu.pagebutton("mcdu", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -101,7 +101,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("perf");</script>
<script>mcdu.pagebutton("perf", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -120,7 +120,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("f-pln");</script>
<script>mcdu.pagebutton("f-pln", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -139,7 +139,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.pagebutton("fuel-pred");</script>
<script>mcdu.pagebutton("fuel-pred", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -158,7 +158,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("1");</script>
<script>mcdu.lskbutton("1", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -172,7 +172,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("1");</script>
<script>mcdu.lskbutton_b("1", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -190,7 +190,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("2");</script>
<script>mcdu.lskbutton("2", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -204,7 +204,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("2");</script>
<script>mcdu.lskbutton_b("2", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -222,7 +222,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("3");</script>
<script>mcdu.lskbutton("3", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -236,7 +236,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("3");</script>
<script>mcdu.lskbutton_b("3", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -254,7 +254,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("4");</script>
<script>mcdu.lskbutton("4", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -268,7 +268,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("4");</script>
<script>mcdu.lskbutton_b("4", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -286,7 +286,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("5");</script>
<script>mcdu.lskbutton("5", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -300,7 +300,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("5");</script>
<script>mcdu.lskbutton_b("5", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -318,7 +318,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton("6");</script>
<script>mcdu.lskbutton("6", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -332,7 +332,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.lskbutton_b("6");</script>
<script>mcdu.lskbutton_b("6", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -351,7 +351,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("1");</script>
<script>mcdu.rskbutton("1", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -365,7 +365,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("1");</script>
<script>mcdu.rskbutton_b("1", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -383,7 +383,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("2");</script>
<script>mcdu.rskbutton("2", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -397,7 +397,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("2");</script>
<script>mcdu.rskbutton_b("2", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -415,7 +415,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("3");</script>
<script>mcdu.rskbutton("3", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -429,7 +429,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("3");</script>
<script>mcdu.rskbutton_b("3", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -447,7 +447,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("4");</script>
<script>mcdu.rskbutton("4", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -461,7 +461,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("4");</script>
<script>mcdu.rskbutton_b("4", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -479,7 +479,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("5");</script>
<script>mcdu.rskbutton("5", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -493,7 +493,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("5");</script>
<script>mcdu.rskbutton_b("5", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -511,7 +511,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton("6");</script>
<script>mcdu.rskbutton("6", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -525,7 +525,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.rskbutton_b("6");</script>
<script>mcdu.rskbutton_b("6", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -544,7 +544,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("left");</script>
<script>mcdu.arrowbutton("left", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -562,7 +562,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("right");</script>
<script>mcdu.arrowbutton("right", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -580,7 +580,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("up");</script>
<script>mcdu.arrowbutton("up", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -598,7 +598,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.arrowbutton("down");</script>
<script>mcdu.arrowbutton("down", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -617,7 +617,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("A");</script>
<script>mcdu.button("A", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -635,7 +635,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("B");</script>
<script>mcdu.button("B", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -653,7 +653,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("C");</script>
<script>mcdu.button("C", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -671,7 +671,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("D");</script>
<script>mcdu.button("D", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -689,7 +689,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("E");</script>
<script>mcdu.button("E", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -707,7 +707,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("F");</script>
<script>mcdu.button("F", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -725,7 +725,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("G");</script>
<script>mcdu.button("G", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -743,7 +743,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("H");</script>
<script>mcdu.button("H", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -761,7 +761,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("I");</script>
<script>mcdu.button("I", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -779,7 +779,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("J");</script>
<script>mcdu.button("J", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -797,7 +797,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("K");</script>
<script>mcdu.button("K", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -815,7 +815,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("L");</script>
<script>mcdu.button("L", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -833,7 +833,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("M");</script>
<script>mcdu.button("M", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -851,7 +851,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("N");</script>
<script>mcdu.button("N", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -869,7 +869,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("O");</script>
<script>mcdu.button("O", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -887,7 +887,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("P");</script>
<script>mcdu.button("P", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -905,7 +905,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Q");</script>
<script>mcdu.button("Q", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -923,7 +923,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("R");</script>
<script>mcdu.button("R", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -941,7 +941,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("S");</script>
<script>mcdu.button("S", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -959,7 +959,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("T");</script>
<script>mcdu.button("T", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -977,7 +977,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("U");</script>
<script>mcdu.button("U", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -995,7 +995,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("V");</script>
<script>mcdu.button("V", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1013,7 +1013,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("W");</script>
<script>mcdu.button("W", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1031,7 +1031,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("X");</script>
<script>mcdu.button("X", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1049,7 +1049,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Y");</script>
<script>mcdu.button("Y", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1067,7 +1067,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("Z");</script>
<script>mcdu.button("Z", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1085,7 +1085,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("SLASH");</script>
<script>mcdu.button("SLASH", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1103,7 +1103,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("SP");</script>
<script>mcdu.button("SP", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1121,7 +1121,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("OVFY");</script>
<script>mcdu.button("OVFY", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1139,7 +1139,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("CLR");</script>
<script>mcdu.button("CLR", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1157,7 +1157,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("0");</script>
<script>mcdu.button("0", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1175,7 +1175,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("1");</script>
<script>mcdu.button("1", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1193,7 +1193,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("2");</script>
<script>mcdu.button("2", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1211,7 +1211,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("3");</script>
<script>mcdu.button("3", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1229,7 +1229,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("4");</script>
<script>mcdu.button("4", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1247,7 +1247,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("5");</script>
<script>mcdu.button("5", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1265,7 +1265,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("6");</script>
<script>mcdu.button("6", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1283,7 +1283,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("7");</script>
<script>mcdu.button("7", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1301,7 +1301,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("8");</script>
<script>mcdu.button("8", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1319,7 +1319,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("9");</script>
<script>mcdu.button("9", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1337,7 +1337,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("DOT");</script>
<script>mcdu.button("DOT", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>
@ -1355,7 +1355,7 @@
<repeatable>true</repeatable>
<binding>
<command>nasal</command>
<script>mcdu2.button("PLUSMINUS");</script>
<script>mcdu.button("PLUSMINUS", 1);</script>
<condition>
<greater-than-equals>
<property>systems/electrical/bus/ac2</property>

View file

@ -305,8 +305,8 @@ var reset_FMGC = func {
alt = getprop("/it-autoflight/input/alt");
APinit();
FMGCinit();
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();
mcdu.MCDU_reset(0);
mcdu.MCDU_reset(1);
setprop("/it-autoflight/input/fd1", fd1);
setprop("/it-autoflight/input/fd2", fd2);
setprop("/it-autoflight/input/spd-kts", spd);

View file

@ -4,19 +4,19 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var dataInput = func(key) {
var dataInput = func(key, i) {
if (key == "L1") {
setprop("/MCDU[0]/page", "POSMON");
setprop("/MCDU[" ~ i ~ "]/page", "POSMON");
}
if (key == "L2") {
setprop("/MCDU[0]/page", "IRSMON");
setprop("/MCDU[" ~ i ~ "]/page", "IRSMON");
}
if (key == "R5") {
setprop("/MCDU[0]/page", "PRINTFUNC");
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
}
var printInput = func(key) {
var printInput = func(key, i) {
if (key == "L1") {
setprop("/FMGC/print/mcdu/page1/L1auto", 1);
}
@ -27,7 +27,7 @@ var printInput = func(key) {
setprop("/FMGC/print/mcdu/page1/L3auto", 1);
}
if (key == "L5") {
setprop("/MCDU[0]/page", "DATA");
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
}
if (key == "R1") {
setprop("/FMGC/print/mcdu/page1/R1req", 1);
@ -40,7 +40,7 @@ var printInput = func(key) {
}
}
var printInput2 = func(key) {
var printInput2 = func(key, i) {
if (key == "L1") {
setprop("/FMGC/print/mcdu/page2/L1auto", 1);
}
@ -54,7 +54,7 @@ var printInput2 = func(key) {
setprop("/FMGC/print/mcdu/page2/L4auto", 1);
}
if (key == "L6") {
setprop("/MCDU[0]/page", "DATA");
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
}
if (key == "R1") {
setprop("/FMGC/print/mcdu/page2/R1req", 1);
@ -68,4 +68,4 @@ var printInput2 = func(key) {
if (key == "R4") {
setprop("/FMGC/print/mcdu/page2/R4req", 1);
}
}
}

121
Nasal/MCDU/INITA.nas Normal file
View file

@ -0,0 +1,121 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputA = func(key, i) {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/flight-num-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/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[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cost-index", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
notAllowed(i);
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var crz = int(scratchpad);
var crzs = size(scratchpad);
if (crzs >= 1 and crzs <= 3) {
if (crz == nil) {
notAllowed(i);
} 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);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} 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[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 9 and find("/", scratchpad) != -1) {
var fromto = split("/", scratchpad);
var froms = size(fromto[0]);
var tos = size(fromto[1]);
if (froms == 4 and tos == 4) {
setprop("/FMGC/internal/dep-arpt", fromto[0]);
setprop("/FMGC/internal/arr-arpt", fromto[1]);
setprop("/FMGC/internal/tofrom-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
fmgc.updateARPT();
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "R3") {
if (getprop("/controls/adirs/mcducbtn") == 0) {
setprop("/controls/adirs/mcducbtn", 1);
}
} else if (key == "R6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tropo = size(scratchpad);
if (tropo == 5) {
setprop("/FMGC/internal/tropo-set", 1);
setprop("/FMGC/internal/tropo", scratchpad);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
}
}

71
Nasal/MCDU/INITB.nas Normal file
View file

@ -0,0 +1,71 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputB = func(key, i) {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
notAllowed(i);
} else {
var tfs = size(scratchpad);
if (tfs == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
var zfwi = split("/", scratchpad);
var zfwcg = size(zfwi[0]);
var zfw = size(zfwi[1]);
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
setprop("/FMGC/internal/zfwcg", zfwi[0]);
setprop("/FMGC/internal/zfwcg-set", 1);
}
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
setprop("/FMGC/internal/zfw", zfwi[1]);
setprop("/FMGC/internal/zfw-set", 1);
}
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else if (tfs >= 1 and tfs <= 5) {
var zfwcg = size(scratchpad);
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
setprop("/FMGC/internal/zfwcg", scratchpad);
setprop("/FMGC/internal/zfwcg-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/block-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
var maxblock = getprop("/options/maxblock");
if (tfs == 0) {
setprop("/MCDU[" ~ i ~ "]/scratchpad", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
} else if (tfs >= 1 and tfs <= 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
setprop("/FMGC/internal/block", scratchpad);
setprop("/FMGC/internal/block-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
}
}

538
Nasal/MCDU/MCDU.nas Normal file
View file

@ -0,0 +1,538 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var MCDU_init = func(i) {
setprop("/MCDU[" ~ i ~ "]/brightness", "1.0");
MCDU_reset(i); # Reset MCDU, clears data
}
var MCDU_reset = func(i) {
setprop("/MCDU[" ~ i ~ "]/active", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/last-page", "NONE");
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS");
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", 0);
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDUC/flight-num-set", 0);
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/dep-arpt", "");
setprop("/FMGC/internal/arr-arpt", "");
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cost-index", "0");
setprop("/FMGC/internal/trans-alt", 18000);
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/zfw", 0);
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
setprop("/FMGC/internal/v1-set", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/FMGC/internal/block-set", 0);
setprop("/FMGC/internal/zfw-set", 0);
setprop("/FMGC/internal/zfwcg-set", 0);
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/tofrom-set", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/vor2freq-set", 0);
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
setprop("/FMGC/print/mcdu/page1/L1auto", 0);
setprop("/FMGC/print/mcdu/page1/L2auto", 0);
setprop("/FMGC/print/mcdu/page1/L3auto", 0);
setprop("/FMGC/print/mcdu/page1/R1req", 0);
setprop("/FMGC/print/mcdu/page1/R2req", 0);
setprop("/FMGC/print/mcdu/page1/R3req", 0);
setprop("/FMGC/print/mcdu/page2/L1auto", 0);
setprop("/FMGC/print/mcdu/page2/L2auto", 0);
setprop("/FMGC/print/mcdu/page2/L3auto", 0);
setprop("/FMGC/print/mcdu/page2/L4auto", 0);
setprop("/FMGC/print/mcdu/page2/R1req", 0);
setprop("/FMGC/print/mcdu/page2/R2req", 0);
setprop("/FMGC/print/mcdu/page2/R3req", 0);
setprop("/FMGC/print/mcdu/page2/R4req", 0);
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
}
var lskbutton = func(btn, i) {
if (btn == "1") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
if (getprop("/MCDU[" ~ i ~ "]/active") != 2) {
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
setprop("/MCDU[" ~ i ~ "]/active", 1);
settimer(func(){
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/active", 2);
}, 2);
} else {
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-fmgc-page"));
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("L1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L1",i);
} else {
notAllowed(i);
}
} else if (btn == "2") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
PerfInput("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
initInputA("L5",i); # Does the same thing as on the INIT page
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
initInputA("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
initInputA("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L2",i);
} else {
notAllowed(i);
}
} else if (btn == "3") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "STATUS") {
statusInput("L3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L3",i);
} else {
notAllowed(i);
}
} else if (btn == "4") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
setprop("/MCDU[" ~ i ~ "]/page", "STATUS");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L4",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L4",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L4",i);
} else {
notAllowed(i);
}
} else if (btn == "5") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
perfDESInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("L5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L5",i);
} else {
notAllowed(i);
}
} else if (btn == "6") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("L6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("L6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("L6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DES") {
perfDESInput("L6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("L6",i);
} else {
notAllowed(i);
}
}
}
var lskbutton_b = func(btn, i) {
# Special Middle Click Functions
}
var rskbutton = func(btn, i) {
if (btn == "1") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
initInputB("R1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R1",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R1",i);
} else {
notAllowed(i);
}
} else if (btn == "2") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
initInputB("R2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R2",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R2",i);
} else {
notAllowed(i);
}
} else if (btn == "3") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
printInput("R3",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R3",i);
} else {
notAllowed(i);
}
} else if (btn == "4") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R4",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R4",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
printInput2("R4",i);
} else {
notAllowed(i);
}
} else if (btn == "5") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "RADNAV") {
radnavInput("R5",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
dataInput("R5",i);
} else {
notAllowed(i);
}
} else if (btn == "6") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "MCDU") {
if (getprop("/MCDU[" ~ i ~ "]/last-page") != "NONE") {
setprop("/MCDU[" ~ i ~ "]/page", getprop("/MCDU[" ~ i ~ "]/last-page"));
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else {
notAllowed(i);
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "TO") {
perfTOInput("R6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CLB") {
perfCLBInput("R6",i);
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "CRZ") {
perfCRZInput("R6",i);
} else if ((getprop("/MCDU[" ~ i ~ "]/page") == "DATA") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") or (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2")) {
if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "AOC DISABLED") {
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
}
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "AOC DISABLED");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
initInputA("R6",i);
} else {
notAllowed(i);
}
}
}
var rskbutton_b = func(btn, i) {
# Special Middle Click Functions
}
var arrowbutton = func(btn, i) {
if (btn == "left") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
}
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[" ~ i ~ "]/page", "INITB");
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
}
if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
} else if (btn == "right") {
if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA2");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "DATA2") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
}
if (getprop("/MCDU[" ~ i ~ "]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[" ~ i ~ "]/page", "INITB");
}
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "INITB") {
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
}
if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC") {
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[" ~ i ~ "]/page") == "PRINTFUNC2") {
setprop("/MCDU[" ~ i ~ "]/page", "PRINTFUNC");
}
} else if (btn == "up") {
# Nothing for now
} else if (btn == "down") {
# Nothing for now
}
}
var pagebutton = func(btn, i) {
if (getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
if (btn == "radnav") {
setprop("/MCDU[" ~ i ~ "]/page", "RADNAV");
} else if (btn == "perf") {
if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
setprop("/MCDU[" ~ i ~ "]/page", "TO");
} else if (getprop("/FMGC/status/phase") == 2) {
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
} else if (getprop("/FMGC/status/phase") == 3) {
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
} else if (getprop("/FMGC/status/phase") == 4) {
setprop("/MCDU[" ~ i ~ "]/page", "DES");
}
} else if (btn == "init") {
setprop("/MCDU[" ~ i ~ "]/page", "INITA");
} else if (btn == "data") {
setprop("/MCDU[" ~ i ~ "]/page", "DATA");
} else if (btn == "mcdu") {
setprop("/MCDU[" ~ i ~ "]/last-page", getprop("/MCDU[" ~ i ~ "]/page"));
setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", getprop("/MCDU[" ~ i ~ "]/page"));
setprop("/MCDU[" ~ i ~ "]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[" ~ i ~ "]/page", "MCDU");
} else if (btn == "f-pln") {
setprop("/MCDU[" ~ i ~ "]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
setprop("/MCDU[" ~ i ~ "]/page", "FUELPRED");
}
}
}
var button = func(btn, i) {
if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 0 and getprop("/MCDU[" ~ i ~ "]/page") != "MCDU") {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (btn == "A") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "A");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "B") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "B");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "C") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "C");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "D") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "D");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "E") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "E");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "F") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "F");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "G") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "G");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "H") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "H");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "I") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "I");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "J") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "J");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "K") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "K");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "L") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "L");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "M") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "M");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "N") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "N");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "O") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "O");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "P") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "P");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "Q") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Q");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "R") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "R");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "S") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "S");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "T") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "T");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "U") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "U");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "V") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "V");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "W") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "W");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "X") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "X");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "Y") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Y");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "Z") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "Z");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "SLASH") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "/");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "SP") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ " ");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "CLR") {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
} else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (size(scratchpad) > 0) {
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", left(scratchpad, size(scratchpad)-1));
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
}
} else if (btn == "0") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "1") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "2") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "2");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "3") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "3");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "4") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "4");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "5") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "5");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "6") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "6");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "7") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "7");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "8") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "8");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "9") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "9");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "DOT") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ ".");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
} else if (btn == "PLUSMINUS") {
setprop("/MCDU[" ~ i ~ "]/scratchpad", scratchpad ~ "-");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
}
} else {
if (btn == "CLR") {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "CLR");
} else if (getprop("/MCDU[" ~ i ~ "]/scratchpad-msg") == 1) {
setprop("/MCDU[" ~ i ~ "]/scratchpad", getprop("/MCDU[" ~ i ~ "]/last-scratchpad"));
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
}
}
}
}
var notAllowed = func(i) {
if (getprop("/MCDU[" ~ i ~ "]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[" ~ i ~ "]/last-scratchpad", getprop("/MCDU[" ~ i ~ "]/scratchpad"));
}
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "1");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "NOT ALLOWED");
}
var screenFlash = func(time, i) {
var page = getprop("/MCDU[" ~ i ~ "]/page");
setprop("/MCDU[" ~ i ~ "]/page", "NONE");
settimer(func {
setprop("/MCDU[" ~ i ~ "]/page", page);
}, time);
}

37
Nasal/MCDU/PERFCLB.nas Normal file
View file

@ -0,0 +1,37 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfCLBInput = func(key, i) {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cost-index", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
notAllowed(i);
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L6") {
setprop("/MCDU[" ~ i ~ "]/page", "TO");
} else if (key == "R6") {
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
}
}

View file

@ -4,11 +4,11 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfCRZInput = func(key) {
var perfCRZInput = func(key, i) {
if (key == "L6") {
setprop("/MCDU[0]/page", "CLB");
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
}
if (key == "R6") {
setprop("/MCDU[0]/page", "DES");
setprop("/MCDU[" ~ i ~ "]/page", "DES");
}
}

View file

@ -4,8 +4,8 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfDESInput = func(key) {
var perfDESInput = func(key, i) {
if (key == "L6") {
setprop("/MCDU[1]/page", "CRZ");
setprop("/MCDU[" ~ i ~ "]/page", "CRZ");
}
}

176
Nasal/MCDU/PERFTO.nas Normal file
View file

@ -0,0 +1,176 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfTOInput = func(key, i) {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/v1-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v1", scratchpad);
setprop("/FMGC/internal/v1-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/vr", scratchpad);
setprop("/FMGC/internal/vr-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v2", scratchpad);
setprop("/FMGC/internal/v2-set", 1);
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
notAllowed(i);
} else {
var tfs = size(scratchpad);
if (tfs == 4 or tfs == 5) {
if (scratchpad >= 1000 and scratchpad <= 18000) {
setprop("/FMGC/internal/trans-alt", scratchpad);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/systems/thrust/clbreduc-ft", "1500");
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
var thracc = split("/", scratchpad);
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
setprop("/systems/thrust/clbreduc-ft", thracc[0]);
setprop("/FMGC/internal/reduc-agl-ft", thracc[1]);
setprop("/MCDUC/thracc-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 7 and find("/", scratchpad) != -1) {
var flapths = split("/UP", scratchpad);
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
setprop("/FMGC/internal/to-flap", flapths[0]);
setprop("/FMGC/internal/to-ths", flapths[1]);
setprop("/FMGC/internal/flap-ths-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "R4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 1 or tfs == 2) {
if (scratchpad >= 0 and scratchpad <= 70) {
setprop("/FMGC/internal/flex", scratchpad);
setprop("/FMGC/internal/flex-set", 1);
var flex_calc = getprop("/FMGC/internal/flex") - getprop("/environment/temperature-degc");
setprop("/FMGC/internal/flex-cmd", flex_calc);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
} else {
notAllowed(i);
}
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5) {
setprop("/FMGC/internal/eng-out-reduc", scratchpad);
setprop("/MCDUC/reducacc-set", 1);
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
notAllowed(i);
}
}
} else if (key == "R6") {
setprop("/MCDU[" ~ i ~ "]/page", "CLB");
}
}

View file

@ -4,13 +4,13 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var radnavInput = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
var radnavInput = func(key, i) {
var scratchpad = getprop("/MCDU[" ~ i ~ "]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@ -19,67 +19,47 @@ var radnavInput = func(key) {
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
} else {
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@ -90,88 +70,60 @@ var radnavInput = func(key) {
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/ils1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/ils1crs-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
setprop("/instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
setprop("/FMGC/internal/adf1freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "R1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor2freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
@ -180,87 +132,59 @@ var radnavInput = func(key) {
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
} else {
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[3]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor2crs-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad-msg", "0");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
setprop("/instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
setprop("/FMGC/internal/adf2freq-set", 1);
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[" ~ i ~ "]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
notAllowed(i);
}
}
}

View file

@ -4,7 +4,7 @@
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var statusInput = func(key) {
var statusInput = func(key, i) {
if (key == "L3") {
fmgc.switchDatabase();
}

View file

@ -1,161 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputA = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/flight-num-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "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 {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
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);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var crz = int(scratchpad);
var crzs = size(scratchpad);
if (crzs >= 1 and crzs <= 3) {
if (crz == nil) {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
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);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
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-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 9 and find("/", scratchpad) != -1) {
var fromto = split("/", scratchpad);
var froms = size(fromto[0]);
var tos = size(fromto[1]);
if (froms == 4 and tos == 4) {
setprop("/FMGC/internal/dep-arpt", fromto[0]);
setprop("/FMGC/internal/arr-arpt", fromto[1]);
setprop("/FMGC/internal/tofrom-set", 1);
setprop("/MCDU[0]/scratchpad", "");
fmgc.updateARPT();
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R3") {
if (getprop("/controls/adirs/mcducbtn") == 0) {
setprop("/controls/adirs/mcducbtn", 1);
}
} else if (key == "R6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tropo = size(scratchpad);
if (tropo == 5) {
setprop("/FMGC/internal/tropo-set", 1);
setprop("/FMGC/internal/tropo", scratchpad);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
}

View file

@ -1,95 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputB = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
setprop("/MCDU[0]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
var zfwi = split("/", scratchpad);
var zfwcg = size(zfwi[0]);
var zfw = size(zfwi[1]);
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
setprop("/FMGC/internal/zfwcg", zfwi[0]);
setprop("/FMGC/internal/zfwcg-set", 1);
}
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
setprop("/FMGC/internal/zfw", zfwi[1]);
setprop("/FMGC/internal/zfw-set", 1);
}
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (tfs >= 1 and tfs <= 5) {
var zfwcg = size(scratchpad);
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
setprop("/FMGC/internal/zfwcg", scratchpad);
setprop("/FMGC/internal/zfwcg-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/block-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
var maxblock = getprop("/options/maxblock");
if (tfs == 0) {
setprop("/MCDU[0]/scratchpad", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
} else if (tfs >= 1 and tfs <= 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
setprop("/FMGC/internal/block", scratchpad);
setprop("/FMGC/internal/block-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
}

View file

@ -1,568 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var MCDU_init = func {
setprop("/MCDU[0]/brightness", "1.0");
MCDU_reset(); # Reset MCDU, clears data
}
var MCDU_reset = func {
setprop("/MCDU[0]/active", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[0]/last-scratchpad", "");
setprop("/MCDU[0]/last-fmgc-page", "STATUS");
setprop("/MCDU[0]/page", "MCDU");
setprop("/MCDU[0]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[0]/scratchpad-msg", 0);
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDUC/flight-num-set", 0);
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/dep-arpt", "");
setprop("/FMGC/internal/arr-arpt", "");
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cost-index", "0");
setprop("/FMGC/internal/trans-alt", 18000);
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/zfw", 0);
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
setprop("/FMGC/internal/v1-set", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/FMGC/internal/block-set", 0);
setprop("/FMGC/internal/zfw-set", 0);
setprop("/FMGC/internal/zfwcg-set", 0);
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/tofrom-set", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/vor2freq-set", 0);
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
setprop("/FMGC/print/mcdu/page1/L1auto", 0);
setprop("/FMGC/print/mcdu/page1/L2auto", 0);
setprop("/FMGC/print/mcdu/page1/L3auto", 0);
setprop("/FMGC/print/mcdu/page1/R1req", 0);
setprop("/FMGC/print/mcdu/page1/R2req", 0);
setprop("/FMGC/print/mcdu/page1/R3req", 0);
setprop("/FMGC/print/mcdu/page2/L1auto", 0);
setprop("/FMGC/print/mcdu/page2/L2auto", 0);
setprop("/FMGC/print/mcdu/page2/L3auto", 0);
setprop("/FMGC/print/mcdu/page2/L4auto", 0);
setprop("/FMGC/print/mcdu/page2/R1req", 0);
setprop("/FMGC/print/mcdu/page2/R2req", 0);
setprop("/FMGC/print/mcdu/page2/R3req", 0);
setprop("/FMGC/print/mcdu/page2/R4req", 0);
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
}
var lskbutton = func(btn) {
if (btn == "1") {
if (getprop("/MCDU[0]/page") == "MCDU") {
if (getprop("/MCDU[0]/active") != 2) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
setprop("/MCDU[0]/active", 1);
settimer(func(){
setprop("/MCDU[0]/page", getprop("/MCDU[0]/last-fmgc-page"));
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/active", 2);
}, 2);
} else {
setprop("/MCDU[0]/page", getprop("/MCDU[0]/last-fmgc-page"));
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[0]/scratchpad-msg", "0");
}
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L1");
} else if (getprop("/MCDU[0]/page") == "DATA") {
dataInput("L1");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("L1");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L1");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[0]/page") == "INITA") {
PerfInput("L2");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L2");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L2");
} else if (getprop("/MCDU[0]/page") == "CLB") {
initInputA("L5"); # Does the same thing as on the INIT page
} else if (getprop("/MCDU[0]/page") == "CRZ") {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "DES") {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "DATA") {
dataInput("L2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("L2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L2");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("L3");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L3");
} else if (getprop("/MCDU[0]/page") == "STATUS") {
statusInput("L3");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L3");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("L3");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L3");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[0]/page") == "DATA") {
setprop("/MCDU[0]/page", "STATUS");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L4");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L4");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("L5");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("L5");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("L5");
} else if (getprop("/MCDU[0]/page") == "CRZ") {
perfCRZInput("L5");
} else if (getprop("/MCDU[0]/page") == "DES") {
perfDESInput("L5");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L5");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("L5");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L5");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("L6");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("L6");
} else if (getprop("/MCDU[0]/page") == "CRZ") {
perfCRZInput("L6");
} else if (getprop("/MCDU[0]/page") == "DES") {
perfDESInput("L6");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("L6");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
var lskbutton_b = func(btn) {
# Special Middle Click Functions
}
var rskbutton = func(btn) {
if (btn == "1") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("R1");
} else if (getprop("/MCDU[0]/page") == "INITB") {
initInputB("R1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R1");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("R1");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("R1");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[0]/page") == "INITB") {
initInputB("R2");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("R2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("R2");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("R3");
} else if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("R3");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
printInput("R3");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("R3");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("R4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R4");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
printInput2("R4");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[0]/page") == "TO") {
perfTOInput("R5");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R5");
} else if (getprop("/MCDU[0]/page") == "DATA") {
dataInput("R5");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} 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");
} else if ((getprop("/MCDU[0]/page") == "DATA") or (getprop("/MCDU[0]/page") == "PRINTFUNC") or (getprop("/MCDU[0]/page") == "PRINTFUNC2")) {
if (getprop("/MCDU[0]/scratchpad") != "AOC DISABLED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "AOC DISABLED");
} else if (getprop("/MCDU[0]/page") == "INITA") {
initInputA("R6");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
var rskbutton_b = func(btn) {
# Special Middle Click Functions
}
var arrowbutton = func(btn) {
if (btn == "left") {
if (getprop("/MCDU[0]/page") == "DATA") {
setprop("/MCDU[0]/page", "DATA2");
} else if (getprop("/MCDU[0]/page") == "DATA2") {
setprop("/MCDU[0]/page", "DATA");
}
if (getprop("/MCDU[0]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[0]/page", "INITB");
}
} else if (getprop("/MCDU[0]/page") == "INITB") {
setprop("/MCDU[0]/page", "INITA");
}
if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
setprop("/MCDU[0]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
setprop("/MCDU[0]/page", "PRINTFUNC");
}
} else if (btn == "right") {
if (getprop("/MCDU[0]/page") == "DATA") {
setprop("/MCDU[0]/page", "DATA2");
} else if (getprop("/MCDU[0]/page") == "DATA2") {
setprop("/MCDU[0]/page", "DATA");
}
if (getprop("/MCDU[0]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[0]/page", "INITB");
}
} else if (getprop("/MCDU[0]/page") == "INITB") {
setprop("/MCDU[0]/page", "INITA");
}
if (getprop("/MCDU[0]/page") == "PRINTFUNC") {
setprop("/MCDU[0]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[0]/page") == "PRINTFUNC2") {
setprop("/MCDU[0]/page", "PRINTFUNC");
}
} else if (btn == "up") {
# Nothing for now
} else if (btn == "down") {
# Nothing for now
}
}
var pagebutton = func(btn) {
if (getprop("/MCDU[0]/page") != "MCDU") {
if (btn == "radnav") {
setprop("/MCDU[0]/page", "RADNAV");
} else if (btn == "perf") {
if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
setprop("/MCDU[0]/page", "TO");
} else if (getprop("/FMGC/status/phase") == 2) {
setprop("/MCDU[0]/page", "CLB");
} else if (getprop("/FMGC/status/phase") == 3) {
setprop("/MCDU[0]/page", "CRZ");
} else if (getprop("/FMGC/status/phase") == 4) {
setprop("/MCDU[0]/page", "DES");
}
} else if (btn == "init") {
setprop("/MCDU[0]/page", "INITA");
} else if (btn == "data") {
setprop("/MCDU[0]/page", "DATA");
} else if (btn == "mcdu") {
setprop("/MCDU[0]/last-fmgc-page", getprop("/MCDU[0]/page"));
setprop("/MCDU[0]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[0]/page", "MCDU");
} else if (btn == "f-pln") {
setprop("/MCDU[0]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
setprop("/MCDU[0]/page", "FUELPRED");
}
}
}
var button = func(btn) {
if (getprop("/MCDU[0]/scratchpad-msg") == 0 and getprop("/MCDU[0]/page") != "MCDU") {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (btn == "A") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "A");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "B") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "B");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "C") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "C");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "D") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "D");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "E") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "E");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "F") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "F");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "G") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "G");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "H") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "H");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "I") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "I");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "J") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "J");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "K") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "K");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "L") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "L");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "M") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "M");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "N") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "N");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "O") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "O");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "P") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "P");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "Q") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "Q");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "R") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "R");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "S") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "S");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "T") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "T");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "U") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "U");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "V") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "V");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "W") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "W");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "X") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "X");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "Y") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "Y");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "Z") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "Z");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "SLASH") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "/");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "SP") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ " ");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "CLR") {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "CLR");
} else if (getprop("/MCDU[0]/scratchpad-msg") == 1) {
setprop("/MCDU[0]/scratchpad", "");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (size(scratchpad) > 0) {
setprop("/MCDU[0]/last-scratchpad", "");
setprop("/MCDU[0]/scratchpad", left(scratchpad, size(scratchpad)-1));
setprop("/MCDU[0]/scratchpad-msg", "0");
}
} else if (btn == "0") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "0");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "1") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "1");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "2") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "2");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "3") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "3");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "4") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "4");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "5") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "5");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "6") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "6");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "7") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "7");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "8") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "8");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "9") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "9");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "DOT") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ ".");
setprop("/MCDU[0]/scratchpad-msg", "0");
} else if (btn == "PLUSMINUS") {
setprop("/MCDU[0]/scratchpad", scratchpad ~ "-");
setprop("/MCDU[0]/scratchpad-msg", "0");
}
} else {
if (btn == "CLR") {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "CLR");
} else if (getprop("/MCDU[0]/scratchpad-msg") == 1) {
setprop("/MCDU[0]/scratchpad", getprop("/MCDU[0]/last-scratchpad"));
setprop("/MCDU[0]/last-scratchpad", "");
setprop("/MCDU[0]/scratchpad-msg", "0");
}
}
}
}
var screenFlash = func(time) {
var page = getprop("/MCDU[0]/page");
setprop("/MCDU[0]/page", "NONE");
settimer(func {
setprop("/MCDU[0]/page", page);
}, time);
}

View file

@ -1,49 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfCLBInput = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cost-index", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L6") {
setprop("/MCDU[0]/page", "TO");
} else if (key == "R6") {
setprop("/MCDU[0]/page", "CRZ");
}
}

View file

@ -1,11 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfDESInput = func(key) {
if (key == "L6") {
setprop("/MCDU[0]/page", "CRZ");
}
}

View file

@ -1,240 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/v1-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v1", scratchpad);
setprop("/FMGC/internal/v1-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/vr", scratchpad);
setprop("/FMGC/internal/vr-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v2", scratchpad);
setprop("/FMGC/internal/v2-set", 1);
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 4 or tfs == 5) {
if (scratchpad >= 1000 and scratchpad <= 18000) {
setprop("/FMGC/internal/trans-alt", scratchpad);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/systems/thrust/clbreduc-ft", "1500");
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
var thracc = split("/", scratchpad);
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
setprop("/systems/thrust/clbreduc-ft", thracc[0]);
setprop("/FMGC/internal/reduc-agl-ft", thracc[1]);
setprop("/MCDUC/thracc-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 7 and find("/", scratchpad) != -1) {
var flapths = split("/UP", scratchpad);
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
setprop("/FMGC/internal/to-flap", flapths[0]);
setprop("/FMGC/internal/to-ths", flapths[1]);
setprop("/FMGC/internal/flap-ths-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 1 or tfs == 2) {
if (scratchpad >= 0 and scratchpad <= 70) {
setprop("/FMGC/internal/flex", scratchpad);
setprop("/FMGC/internal/flex-set", 1);
var flex_calc = getprop("/FMGC/internal/flex") - getprop("/environment/temperature-degc");
setprop("/FMGC/internal/flex-cmd", flex_calc);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDU[0]/scratchpad-msg", "0");
setprop("/MCDU[0]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5) {
setprop("/FMGC/internal/eng-out-reduc", scratchpad);
setprop("/MCDUC/reducacc-set", 1);
setprop("/MCDU[0]/scratchpad", "");
} else {
if (getprop("/MCDU[0]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[0]/last-scratchpad", getprop("/MCDU[0]/scratchpad"));
}
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R6") {
setprop("/MCDU[0]/page", "CLB");
}
}

View file

@ -1,71 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var dataInput = func(key) {
if (key == "L1") {
setprop("/MCDU[1]/page", "POSMON");
}
if (key == "L2") {
setprop("/MCDU[1]/page", "IRSMON");
}
if (key == "R5") {
setprop("/MCDU[1]/page", "PRINTFUNC");
}
}
var printInput = func(key) {
if (key == "L1") {
setprop("/FMGC/print/mcdu/page1/L1auto", 1);
}
if (key == "L2") {
setprop("/FMGC/print/mcdu/page1/L2auto", 1);
}
if (key == "L3") {
setprop("/FMGC/print/mcdu/page1/L3auto", 1);
}
if (key == "L5") {
setprop("/MCDU[1]/page", "DATA");
}
if (key == "R1") {
setprop("/FMGC/print/mcdu/page1/R1req", 1);
}
if (key == "R2") {
setprop("/FMGC/print/mcdu/page1/R2req", 1);
}
if (key == "R3") {
setprop("/FMGC/print/mcdu/page1/R3req", 1);
}
}
var printInput2 = func(key) {
if (key == "L1") {
setprop("/FMGC/print/mcdu/page2/L1auto", 1);
}
if (key == "L2") {
setprop("/FMGC/print/mcdu/page2/L2auto", 1);
}
if (key == "L3") {
setprop("/FMGC/print/mcdu/page2/L3auto", 1);
}
if (key == "L4") {
setprop("/FMGC/print/mcdu/page2/L4auto", 1);
}
if (key == "L6") {
setprop("/MCDU[1]/page", "DATA");
}
if (key == "R1") {
setprop("/FMGC/print/mcdu/page2/R1req", 1);
}
if (key == "R2") {
setprop("/FMGC/print/mcdu/page2/R2req", 1);
}
if (key == "R3") {
setprop("/FMGC/print/mcdu/page2/R3req", 1);
}
if (key == "R4") {
setprop("/FMGC/print/mcdu/page2/R4req", 1);
}
}

View file

@ -1,47 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
setprop("/MCDUC/F-PLNA/left-1", "F-PLN PAGE IS NOT ENABLED");
setprop("/MCDUC/F-PLNA/left-2", "BECAUSE IT IS NOT READY");
setprop("/MCDUC/F-PLNA/left-3", "KIND REGARDS");
setprop("/MCDUC/F-PLNA/left-4", "JOSH");
setprop("/MCDUC/F-PLNA/left-5", "");
setprop("/MCDUC/F-PLNA/left-6", "A3XX MCDU 0.55");
setprop("/MCDUC/F-PLNA/center-1", "");
setprop("/MCDUC/F-PLNA/center-2", "");
setprop("/MCDUC/F-PLNA/center-3", "");
setprop("/MCDUC/F-PLNA/center-4", "");
setprop("/MCDUC/F-PLNA/center-5", "");
setprop("/MCDUC/F-PLNA/center-6", "");
setprop("/MCDUC/F-PLNA/right-1", "");
setprop("/MCDUC/F-PLNA/right-2", "");
setprop("/MCDUC/F-PLNA/right-3", "");
setprop("/MCDUC/F-PLNA/right-4", "");
setprop("/MCDUC/F-PLNA/right-5", "");
setprop("/MCDUC/F-PLNA/right-6", "");
setprop("/MCDUC/F-PLNA/left-1c", "w");
setprop("/MCDUC/F-PLNA/left-2c", "w");
setprop("/MCDUC/F-PLNA/left-3c", "w");
setprop("/MCDUC/F-PLNA/left-4c", "w");
setprop("/MCDUC/F-PLNA/left-5c", "w");
setprop("/MCDUC/F-PLNA/left-6c", "w");
setprop("/MCDUC/F-PLNA/center-1c", "w");
setprop("/MCDUC/F-PLNA/center-2c", "w");
setprop("/MCDUC/F-PLNA/center-3c", "w");
setprop("/MCDUC/F-PLNA/center-4c", "w");
setprop("/MCDUC/F-PLNA/center-5c", "w");
setprop("/MCDUC/F-PLNA/center-6c", "w");
setprop("/MCDUC/F-PLNA/right-1c", "w");
setprop("/MCDUC/F-PLNA/right-2c", "w");
setprop("/MCDUC/F-PLNA/right-3c", "w");
setprop("/MCDUC/F-PLNA/right-4c", "w");
setprop("/MCDUC/F-PLNA/right-5c", "w");
setprop("/MCDUC/F-PLNA/right-6c", "w");
var discontinuity = "---- F-PLN DISCONTINUITY ----";
var fpln_end = "------- END OF F-PLN -------";
var altn_fpln_end = "----- END OF ALTN F-PLN -----";

View file

@ -1,161 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputA = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/flight-num-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "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 {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
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);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var crz = int(scratchpad);
var crzs = size(scratchpad);
if (crzs >= 1 and crzs <= 3) {
if (crz == nil) {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
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);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
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-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 9 and find("/", scratchpad) != -1) {
var fromto = split("/", scratchpad);
var froms = size(fromto[0]);
var tos = size(fromto[1]);
if (froms == 4 and tos == 4) {
setprop("/FMGC/internal/dep-arpt", fromto[0]);
setprop("/FMGC/internal/arr-arpt", fromto[1]);
setprop("/FMGC/internal/tofrom-set", 1);
setprop("/MCDU[1]/scratchpad", "");
fmgc.updateARPT();
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R3") {
if (getprop("/controls/adirs/mcducbtn") == 0) {
setprop("/controls/adirs/mcducbtn", 1);
}
} else if (key == "R6") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tropo = size(scratchpad);
if (tropo == 5) {
setprop("/FMGC/internal/tropo-set", 1);
setprop("/FMGC/internal/tropo", scratchpad);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
}

View file

@ -1,95 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var initInputB = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "R1") {
if (scratchpad == "CLR") {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 0) {
var zfw = getprop("/fdm/jsbsim/inertia/weight-lbs") - getprop("/consumables/fuel/total-fuel-lbs");
setprop("/MCDU[1]/scratchpad", "/" ~ sprintf("%3.1f", math.round(zfw / 1000, 0.1)));
} else if (tfs >= 2 and tfs <= 11 and find("/", scratchpad) != -1) {
var zfwi = split("/", scratchpad);
var zfwcg = size(zfwi[0]);
var zfw = size(zfwi[1]);
if (zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) {
setprop("/FMGC/internal/zfwcg", zfwi[0]);
setprop("/FMGC/internal/zfwcg-set", 1);
}
if (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9) {
setprop("/FMGC/internal/zfw", zfwi[1]);
setprop("/FMGC/internal/zfw-set", 1);
}
if ((zfwcg >= 1 and zfwcg <= 5 and zfwi[0] > 0 and zfwi[0] <= 99.9) or (zfw >= 1 and zfw <= 5 and zfwi[1] > 0 and zfwi[1] <= 999.9)) {
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (tfs >= 1 and tfs <= 5) {
var zfwcg = size(scratchpad);
if (zfwcg >= 1 and zfwcg <= 5 and scratchpad > 0 and scratchpad <= 99.9) {
setprop("/FMGC/internal/zfwcg", scratchpad);
setprop("/FMGC/internal/zfwcg-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/block-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
var maxblock = getprop("/options/maxblock");
if (tfs == 0) {
setprop("/MCDU[1]/scratchpad", sprintf("%3.1f", math.round(getprop("/consumables/fuel/total-fuel-lbs") / 1000, 0.1)));
} else if (tfs >= 1 and tfs <= 5) {
if (scratchpad >= 1.0 and scratchpad <= maxblock) {
setprop("/FMGC/internal/block", scratchpad);
setprop("/FMGC/internal/block-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
}

View file

@ -1,568 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var MCDU_init = func {
setprop("/MCDU[1]/brightness", "1.0");
MCDU_reset(); # Reset MCDU, clears data
}
var MCDU_reset = func {
setprop("/MCDU[1]/active", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[1]/last-scratchpad", "");
setprop("/MCDU[1]/last-fmgc-page", "STATUS");
setprop("/MCDU[1]/page", "MCDU");
setprop("/MCDU[1]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[1]/scratchpad-msg", 0);
setprop("/MCDUC/flight-num", "");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDUC/flight-num-set", 0);
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/dep-arpt", "");
setprop("/FMGC/internal/arr-arpt", "");
setprop("/FMGC/internal/cruise-ft", 10000);
setprop("/FMGC/internal/cruise-fl", 100);
setprop("/FMGC/internal/cost-index", "0");
setprop("/FMGC/internal/trans-alt", 18000);
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/block", 0.0);
setprop("/FMGC/internal/zfw", 0);
setprop("/FMGC/internal/zfwcg", 55.1); # 25KG default
setprop("/FMGC/internal/v1-set", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/FMGC/internal/block-set", 0);
setprop("/FMGC/internal/zfw-set", 0);
setprop("/FMGC/internal/zfwcg-set", 0);
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/tofrom-set", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/FMGC/internal/cruise-lvl-set", 0);
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/FMGC/internal/vor2freq-set", 0);
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/FMGC/internal/navdatabase", "01JAN-28JAN");
setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB");
setprop("/FMGC/internal/navdatabasecode", "AB20170101");
setprop("/FMGC/internal/navdatabasecode2", "AB20170102");
setprop("/FMGC/print/mcdu/page1/L1auto", 0);
setprop("/FMGC/print/mcdu/page1/L2auto", 0);
setprop("/FMGC/print/mcdu/page1/L3auto", 0);
setprop("/FMGC/print/mcdu/page1/R1req", 0);
setprop("/FMGC/print/mcdu/page1/R2req", 0);
setprop("/FMGC/print/mcdu/page1/R3req", 0);
setprop("/FMGC/print/mcdu/page2/L1auto", 0);
setprop("/FMGC/print/mcdu/page2/L2auto", 0);
setprop("/FMGC/print/mcdu/page2/L3auto", 0);
setprop("/FMGC/print/mcdu/page2/L4auto", 0);
setprop("/FMGC/print/mcdu/page2/R1req", 0);
setprop("/FMGC/print/mcdu/page2/R2req", 0);
setprop("/FMGC/print/mcdu/page2/R3req", 0);
setprop("/FMGC/print/mcdu/page2/R4req", 0);
setprop("/FMGC/internal/tropo", 36090);
setprop("/FMGC/internal/tropo-set", 0);
}
var lskbutton = func(btn) {
if (btn == "1") {
if (getprop("/MCDU[1]/page") == "MCDU") {
if (getprop("/MCDU[1]/active") != 2) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "WAIT FOR SYSTEM RESPONSE");
setprop("/MCDU[1]/active", 1);
settimer(func(){
setprop("/MCDU[1]/page", getprop("/MCDU[1]/last-fmgc-page"));
setprop("/MCDU[1]/scratchpad", "");
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/active", 2);
}, 2);
} else {
setprop("/MCDU[1]/page", getprop("/MCDU[1]/last-fmgc-page"));
setprop("/MCDU[1]/scratchpad", "");
setprop("/MCDU[1]/scratchpad-msg", "0");
}
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L1");
} else if (getprop("/MCDU[1]/page") == "DATA") {
dataInput("L1");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("L1");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L1");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[1]/page") == "INITA") {
PerfInput("L2");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L2");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L2");
} else if (getprop("/MCDU[1]/page") == "CLB") {
initInputA("L5"); # Does the same thing as on the INIT page
} else if (getprop("/MCDU[1]/page") == "CRZ") {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "DES") {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "DATA") {
dataInput("L2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("L2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L2");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("L3");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L3");
} else if (getprop("/MCDU[1]/page") == "STATUS") {
statusInput("L3");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L3");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("L3");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L3");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[1]/page") == "DATA") {
setprop("/MCDU[1]/page", "STATUS");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L4");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L4");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("L5");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("L5");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("L5");
} else if (getprop("/MCDU[1]/page") == "CRZ") {
perfCRZInput("L5");
} else if (getprop("/MCDU[1]/page") == "DES") {
perfDESInput("L5");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L5");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("L5");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L5");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("L6");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("L6");
} else if (getprop("/MCDU[1]/page") == "CRZ") {
perfCRZInput("L6");
} else if (getprop("/MCDU[1]/page") == "DES") {
perfDESInput("L6");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("L6");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
var lskbutton_b = func(btn) {
# Special Middle Click Functions
}
var rskbutton = func(btn) {
if (btn == "1") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("R1");
} else if (getprop("/MCDU[1]/page") == "INITB") {
initInputB("R1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R1");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("R1");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("R1");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "2") {
if (getprop("/MCDU[1]/page") == "INITB") {
initInputB("R2");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("R2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("R2");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "3") {
if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("R3");
} else if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("R3");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
printInput("R3");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("R3");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("R4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R4");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
printInput2("R4");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[1]/page") == "TO") {
perfTOInput("R5");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R5");
} else if (getprop("/MCDU[1]/page") == "DATA") {
dataInput("R5");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} 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");
} else if ((getprop("/MCDU[1]/page") == "DATA") or (getprop("/MCDU[1]/page") == "PRINTFUNC") or (getprop("/MCDU[1]/page") == "PRINTFUNC2")) {
if (getprop("/MCDU[1]/scratchpad") != "AOC DISABLED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "AOC DISABLED");
} else if (getprop("/MCDU[1]/page") == "INITA") {
initInputA("R6");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
var rskbutton_b = func(btn) {
# Special Middle Click Functions
}
var arrowbutton = func(btn) {
if (btn == "left") {
if (getprop("/MCDU[1]/page") == "DATA") {
setprop("/MCDU[1]/page", "DATA2");
} else if (getprop("/MCDU[1]/page") == "DATA2") {
setprop("/MCDU[1]/page", "DATA");
}
if (getprop("/MCDU[1]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[1]/page", "INITB");
}
} else if (getprop("/MCDU[1]/page") == "INITB") {
setprop("/MCDU[1]/page", "INITA");
}
if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
setprop("/MCDU[1]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
setprop("/MCDU[1]/page", "PRINTFUNC");
}
} else if (btn == "right") {
if (getprop("/MCDU[1]/page") == "DATA") {
setprop("/MCDU[1]/page", "DATA2");
} else if (getprop("/MCDU[1]/page") == "DATA2") {
setprop("/MCDU[1]/page", "DATA");
}
if (getprop("/MCDU[1]/page") == "INITA") {
if (getprop("/engines/engine[0]/state") != 3 and getprop("/engines/engine[1]/state") != 3) {
setprop("/MCDU[1]/page", "INITB");
}
} else if (getprop("/MCDU[1]/page") == "INITB") {
setprop("/MCDU[1]/page", "INITA");
}
if (getprop("/MCDU[1]/page") == "PRINTFUNC") {
setprop("/MCDU[1]/page", "PRINTFUNC2");
} else if (getprop("/MCDU[1]/page") == "PRINTFUNC2") {
setprop("/MCDU[1]/page", "PRINTFUNC");
}
} else if (btn == "up") {
# Nothing for now
} else if (btn == "down") {
# Nothing for now
}
}
var pagebutton = func(btn) {
if (getprop("/MCDU[1]/page") != "MCDU") {
if (btn == "radnav") {
setprop("/MCDU[1]/page", "RADNAV");
} else if (btn == "perf") {
if (getprop("/FMGC/status/phase") == 0 or getprop("/FMGC/status/phase") == 1) {
setprop("/MCDU[1]/page", "TO");
} else if (getprop("/FMGC/status/phase") == 2) {
setprop("/MCDU[1]/page", "CLB");
} else if (getprop("/FMGC/status/phase") == 3) {
setprop("/MCDU[1]/page", "CRZ");
} else if (getprop("/FMGC/status/phase") == 4) {
setprop("/MCDU[1]/page", "DES");
}
} else if (btn == "init") {
setprop("/MCDU[1]/page", "INITA");
} else if (btn == "data") {
setprop("/MCDU[1]/page", "DATA");
} else if (btn == "mcdu") {
setprop("/MCDU[1]/last-fmgc-page", getprop("/MCDU[1]/page"));
setprop("/MCDU[1]/scratchpad", "SELECT DESIRED SYSTEM");
setprop("/MCDU[1]/page", "MCDU");
} else if (btn == "f-pln") {
setprop("/MCDU[1]/page", "F-PLNA");
} else if (btn == "fuel-pred") {
setprop("/MCDU[1]/page", "FUELPRED");
}
}
}
var button = func(btn) {
if (getprop("/MCDU[1]/scratchpad-msg") == 0 and getprop("/MCDU[1]/page") != "MCDU") {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (btn == "A") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "A");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "B") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "B");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "C") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "C");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "D") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "D");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "E") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "E");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "F") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "F");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "G") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "G");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "H") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "H");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "I") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "I");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "J") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "J");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "K") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "K");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "L") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "L");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "M") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "M");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "N") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "N");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "O") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "O");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "P") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "P");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "Q") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "Q");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "R") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "R");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "S") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "S");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "T") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "T");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "U") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "U");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "V") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "V");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "W") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "W");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "X") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "X");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "Y") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "Y");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "Z") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "Z");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "SLASH") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "/");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "SP") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ " ");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "CLR") {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "CLR");
} else if (getprop("/MCDU[1]/scratchpad-msg") == 1) {
setprop("/MCDU[1]/scratchpad", "");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (size(scratchpad) > 0) {
setprop("/MCDU[1]/last-scratchpad", "");
setprop("/MCDU[1]/scratchpad", left(scratchpad, size(scratchpad)-1));
setprop("/MCDU[1]/scratchpad-msg", "0");
}
} else if (btn == "0") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "0");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "1") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "1");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "2") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "2");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "3") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "3");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "4") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "4");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "5") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "5");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "6") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "6");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "7") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "7");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "8") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "8");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "9") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "9");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "DOT") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ ".");
setprop("/MCDU[1]/scratchpad-msg", "0");
} else if (btn == "PLUSMINUS") {
setprop("/MCDU[1]/scratchpad", scratchpad ~ "-");
setprop("/MCDU[1]/scratchpad-msg", "0");
}
} else {
if (btn == "CLR") {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (size(scratchpad) == 0) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "CLR");
} else if (getprop("/MCDU[1]/scratchpad-msg") == 1) {
setprop("/MCDU[1]/scratchpad", getprop("/MCDU[1]/last-scratchpad"));
setprop("/MCDU[1]/last-scratchpad", "");
setprop("/MCDU[1]/scratchpad-msg", "0");
}
}
}
}
var screenFlash = func(time) {
var page = getprop("/MCDU[1]/page");
setprop("/MCDU[1]/page", "NONE");
settimer(func {
setprop("/MCDU[1]/page", page);
}, time);
}

View file

@ -1,49 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfCLBInput = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/cost-index", 0);
setprop("/FMGC/internal/cost-index-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var ci = int(scratchpad);
var cis = size(scratchpad);
if (cis >= 1 and cis <= 3) {
if (ci == nil) {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else if (ci >= 0 and ci <= 999) {
setprop("/FMGC/internal/cost-index", ci);
setprop("/FMGC/internal/cost-index-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L6") {
setprop("/MCDU[1]/page", "TO");
} else if (key == "R6") {
setprop("/MCDU[1]/page", "CRZ");
}
}

View file

@ -1,14 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfCRZInput = func(key) {
if (key == "L6") {
setprop("/MCDU[1]/page", "CLB");
}
if (key == "R6") {
setprop("/MCDU[1]/page", "DES");
}
}

View file

@ -1,240 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v1", 0);
setprop("/FMGC/internal/v1-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v1", scratchpad);
setprop("/FMGC/internal/v1-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vr", 0);
setprop("/FMGC/internal/vr-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/vr", scratchpad);
setprop("/FMGC/internal/vr-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/v2", 0);
setprop("/FMGC/internal/v2-set", 0);
setprop("/it-autoflight/settings/togaspd", 157);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3) {
if (scratchpad >= 100 and scratchpad <= 200) {
setprop("/FMGC/internal/v2", scratchpad);
setprop("/FMGC/internal/v2-set", 1);
setprop("/it-autoflight/settings/togaspd", scratchpad + 10);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
var tfs = size(scratchpad);
if (tfs == 4 or tfs == 5) {
if (scratchpad >= 1000 and scratchpad <= 18000) {
setprop("/FMGC/internal/trans-alt", scratchpad);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/systems/thrust/clbreduc-ft", "1500");
setprop("/FMGC/internal/reduc-agl-ft", "3000");
setprop("/MCDUC/thracc-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 7 and tfs <= 9 and find("/", scratchpad) != -1) {
var thracc = split("/", scratchpad);
var thrred = size(thracc[0]);
var acc = size(thracc[1]);
if ((thrred >= 3 and thrred <= 5) and (acc >= 3 and acc <= 5)) {
setprop("/systems/thrust/clbreduc-ft", thracc[0]);
setprop("/FMGC/internal/reduc-agl-ft", thracc[1]);
setprop("/MCDUC/thracc-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/to-flap", 0);
setprop("/FMGC/internal/to-ths", "0.0");
setprop("/FMGC/internal/flap-ths-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 7 and find("/", scratchpad) != -1) {
var flapths = split("/UP", scratchpad);
if ((flapths[0] >= 1 and flapths[0] <= 4) and (flapths[1] >= 0.0 and flapths[1] <= 2.5)) {
setprop("/FMGC/internal/to-flap", flapths[0]);
setprop("/FMGC/internal/to-ths", flapths[1]);
setprop("/FMGC/internal/flap-ths-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/flex", 0);
setprop("/FMGC/internal/flex-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 1 or tfs == 2) {
if (scratchpad >= 0 and scratchpad <= 70) {
setprop("/FMGC/internal/flex", scratchpad);
setprop("/FMGC/internal/flex-set", 1);
var flex_calc = getprop("/FMGC/internal/flex") - getprop("/environment/temperature-degc");
setprop("/FMGC/internal/flex-cmd", flex_calc);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/eng-out-reduc", "3500");
setprop("/MCDUC/reducacc-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 3 and tfs <= 5) {
setprop("/FMGC/internal/eng-out-reduc", scratchpad);
setprop("/MCDUC/reducacc-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R6") {
setprop("/MCDU[1]/page", "CLB");
}
}

View file

@ -1,267 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var radnavInput = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[2]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor1crs-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[2]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor1crs-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L3") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/ils1freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.00 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
setprop("/instrumentation/nav[0]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/ils1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L4") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/ils1crs-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[0]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/ils1crs-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "L5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/adf1freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
setprop("/instrumentation/adf[0]/frequencies/selected-khz", scratchpad);
setprop("/FMGC/internal/adf1freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R1") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor2freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 5 or tfs == 6) {
if (scratchpad >= 108.10 and scratchpad <= 111.95) {
if (scratchpad == 108.10 or scratchpad == 108.15 or scratchpad == 108.30 or scratchpad == 108.35 or scratchpad == 108.50 or scratchpad == 108.55 or scratchpad == 108.70 or scratchpad == 108.75 or scratchpad == 108.90 or scratchpad == 108.95
or scratchpad == 109.10 or scratchpad == 109.15 or scratchpad == 109.30 or scratchpad == 109.35 or scratchpad == 109.50 or scratchpad == 109.55 or scratchpad == 109.70 or scratchpad == 109.75 or scratchpad == 109.90 or scratchpad == 109.95
or scratchpad == 110.10 or scratchpad == 110.15 or scratchpad == 110.30 or scratchpad == 110.35 or scratchpad == 110.50 or scratchpad == 110.55 or scratchpad == 110.70 or scratchpad == 110.75 or scratchpad == 110.90 or scratchpad == 110.95
or scratchpad == 111.10 or scratchpad == 111.15 or scratchpad == 111.30 or scratchpad == 111.35 or scratchpad == 111.50 or scratchpad == 111.55 or scratchpad == 111.70 or scratchpad == 111.75 or scratchpad == 111.90 or scratchpad == 111.95) {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} else {
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
}
} else if (scratchpad >= 112.00 and scratchpad <= 117.95) {
setprop("/instrumentation/nav[3]/frequencies/selected-mhz", scratchpad);
setprop("/FMGC/internal/vor2freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R2") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/vor2crs-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs >= 1 and tfs <= 3) {
if (scratchpad >= 0 and scratchpad <= 360) {
setprop("/instrumentation/nav[3]/radials/selected-deg", scratchpad);
setprop("/FMGC/internal/vor2crs-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
} else if (key == "R5") {
if (scratchpad == "CLR") {
setprop("/FMGC/internal/adf2freq-set", 0);
setprop("/MCDU[1]/scratchpad-msg", "0");
setprop("/MCDU[1]/scratchpad", "");
} else {
var tfs = size(scratchpad);
if (tfs == 3 or tfs == 4) {
if (scratchpad >= 190 and scratchpad <= 1750) {
setprop("/instrumentation/adf[1]/frequencies/selected-khz", scratchpad);
setprop("/FMGC/internal/adf2freq-set", 1);
setprop("/MCDU[1]/scratchpad", "");
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else {
if (getprop("/MCDU[1]/scratchpad") != "NOT ALLOWED") {
setprop("/MCDU[1]/last-scratchpad", getprop("/MCDU[1]/scratchpad"));
}
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
}

View file

@ -1,11 +0,0 @@
# A3XX mCDU by Joshua Davidson (it0uchpods) and Jonathan Redpath
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
var statusInput = func(key) {
if (key == "L3") {
fmgc.switchDatabase();
}
}

View file

@ -182,8 +182,8 @@ var systemsInit = func {
systems.autobrake_init();
fmgc.APinit();
fmgc.FMGCinit();
mcdu1.MCDU_init();
mcdu2.MCDU_init();
mcdu.MCDU_init(0);
mcdu.MCDU_init(1);
systemsLoop.start();
libraries.CVR.start();
icing.icingInit();