Improve CLB and CRZ MCDU

This commit is contained in:
Joshua Davidson 2017-06-13 16:46:37 -04:00
parent ebb9cd3592
commit 1a4f497c7f
7 changed files with 312 additions and 52 deletions

View file

@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest</name>
<offsets>
@ -457,6 +502,7 @@
<object-name>previous</object-name>
<object-name>phase2</object-name>
<object-name>timedest</object-name>
<object-name>presel</object-name>
<diffuse>
<red>1</red>
<green>1</green>
@ -484,6 +530,7 @@
<type>material</type>
<object-name>efob2</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest2</object-name>
<diffuse>
<red>0.2</red>

View file

@ -48,7 +48,7 @@
</text>
<text>
<name>actmode3</name>
<name>actmode</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -72,7 +72,7 @@
</text>
<text>
<name>actmode4</name>
<name>actmode2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest3</name>
<offsets>
@ -192,7 +237,7 @@
</text>
<text>
<name>ci5</name>
<name>ci</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -216,7 +261,7 @@
</text>
<text>
<name>ci6</name>
<name>ci2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -239,7 +284,7 @@
</font-resolution>
</text>
<text>
<name>ci7</name>
<name>ci3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -264,14 +309,14 @@
<animation>
<type>select</type>
<object-name>ci6</object-name>
<object-name>ci2</object-name>
<condition>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ci7</object-name>
<object-name>ci3</object-name>
<condition>
<property>/FMGC/internal/cost-index-set</property>
</condition>
@ -520,9 +565,9 @@
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>actmode3</object-name>
<object-name>actmode</object-name>
<object-name>managed2</object-name>
<object-name>ci5</object-name>
<object-name>ci</object-name>
<object-name>efob3</object-name>
<object-name>next2</object-name>
<object-name>phase3</object-name>
@ -558,7 +603,8 @@
<animation>
<type>material</type>
<object-name>efob4</object-name>
<object-name>actmode4</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest4</object-name>
<diffuse>
<red>0.2</red>
@ -586,8 +632,8 @@
<animation>
<type>material</type>
<object-name>presel4</object-name>
<object-name>ci6</object-name>
<object-name>ci7</object-name>
<object-name>ci2</object-name>
<object-name>ci3</object-name>
<object-name>descabinrate</object-name>
<diffuse>
<red>0</red>

View file

@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest</name>
<offsets>
@ -457,6 +502,7 @@
<object-name>previous</object-name>
<object-name>phase2</object-name>
<object-name>timedest</object-name>
<object-name>presel</object-name>
<diffuse>
<red>1</red>
<green>1</green>
@ -484,6 +530,7 @@
<type>material</type>
<object-name>efob2</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest2</object-name>
<diffuse>
<red>0.2</red>

View file

@ -48,7 +48,7 @@
</text>
<text>
<name>actmode3</name>
<name>actmode</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -72,7 +72,7 @@
</text>
<text>
<name>actmode4</name>
<name>actmode2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -95,6 +95,51 @@
</font-resolution>
</text>
<text>
<name>actmode3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
<z-m>0.0705</z-m>
</offsets>
<alignment>left-center</alignment>
<axis-alignment>yz-plane</axis-alignment>
<type type="string">text-value</type>
<format type="string">SELECTED</format>
<truncate type="bool">false</truncate>
<font type="string">BoeingCDU-Large.ttf</font>
<property>autopilot/serviceable</property>
<draw-text type="bool">true</draw-text>
<draw-alignment type="bool">false</draw-alignment>
<draw-boundingbox type="bool">false</draw-boundingbox>
<character-size>0.0040</character-size>
<font-resolution>
<width type="int">64</width>
<height type="int">64</height>
</font-resolution>
</text>
<animation>
<type>select</type>
<object-name>actmode2</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>1</value>
</equals>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>actmode3</object-name>
<condition>
<equals>
<property>/it-autoflight/input/spd-managed</property>
<value>0</value>
</equals>
</condition>
</animation>
<text>
<name>timedest3</name>
<offsets>
@ -192,7 +237,7 @@
</text>
<text>
<name>ci5</name>
<name>ci</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -216,7 +261,7 @@
</text>
<text>
<name>ci6</name>
<name>ci2</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -239,7 +284,7 @@
</font-resolution>
</text>
<text>
<name>ci7</name>
<name>ci3</name>
<offsets>
<x-m>-0.001</x-m>
<y-m>-0.045</y-m>
@ -264,14 +309,14 @@
<animation>
<type>select</type>
<object-name>ci6</object-name>
<object-name>ci2</object-name>
<condition>
<not><property>/FMGC/internal/cost-index-set</property></not>
</condition>
</animation>
<animation>
<type>select</type>
<object-name>ci7</object-name>
<object-name>ci3</object-name>
<condition>
<property>/FMGC/internal/cost-index-set</property>
</condition>
@ -520,9 +565,9 @@
<animation>
<type>material</type>
<object-name>page</object-name>
<object-name>actmode3</object-name>
<object-name>actmode</object-name>
<object-name>managed2</object-name>
<object-name>ci5</object-name>
<object-name>ci</object-name>
<object-name>efob3</object-name>
<object-name>next2</object-name>
<object-name>phase3</object-name>
@ -558,7 +603,8 @@
<animation>
<type>material</type>
<object-name>efob4</object-name>
<object-name>actmode4</object-name>
<object-name>actmode2</object-name>
<object-name>actmode3</object-name>
<object-name>timedest4</object-name>
<diffuse>
<red>0.2</red>
@ -586,8 +632,8 @@
<animation>
<type>material</type>
<object-name>presel4</object-name>
<object-name>ci6</object-name>
<object-name>ci7</object-name>
<object-name>ci2</object-name>
<object-name>ci3</object-name>
<object-name>descabinrate</object-name>
<diffuse>
<red>0</red>

View file

@ -115,6 +115,7 @@ var phasecheck = maketimer(0.2, func {
if ((((n1_left >= 85) and (n1_right >= 85)) or (gs > 90 )) and flaps < 4 and (mode == "SRS")) {
setprop("/FMGC/status/phase", "1");
setprop("/systems/pressurization/mode", "TO");
}
if ((aglalt >= reduc_agl_ft) and (alt <= cruiseft) and (phase == "1") and (phase != "4") and (mode != "SRS")) {
@ -128,6 +129,7 @@ var phasecheck = maketimer(0.2, func {
if (alt <= cruiseft and (mode == "DES" or mode == "OP DES") and phase == "3") {
setprop("/FMGC/status/phase", "4");
setprop("/systems/pressurization/mode", "DE");
}
if (getprop("/FMGC/status/to-state") == 0 and flaps >= 3 and ((phase == "3") or (phase == "4")) and alt < 7200) {
@ -177,10 +179,10 @@ var phasecheck = maketimer(0.2, func {
setprop("/FMGC/internal/minspeed", 159);
} else if (flap == 4) {
setprop("/FMGC/internal/overspeed", 174);
setprop("/FMGC/internal/minspeed", 146);
setprop("/FMGC/internal/minspeed", 149);
} else if (flap == 5) {
setprop("/FMGC/internal/overspeed", 163);
setprop("/FMGC/internal/minspeed", 136);
setprop("/FMGC/internal/minspeed", 139);
}
});

View file

@ -53,41 +53,58 @@ var lskbutton = func(btn) {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "GPS PRIMARY");
} else if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("L1");
perfTOInput("L1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L1");
} else {
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");
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 {
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");
perfTOInput("L3");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L3");
} else {
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");
perfTOInput("L4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("L4");
} else {
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");
perfTOInput("L5");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("L5");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[0]/page") == "INITA") {
@ -96,6 +113,9 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[0]/page") == "CRZ") {
perfCRZInput("L6");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
@ -110,37 +130,53 @@ var rskbutton = func(btn) {
initInputA("R1");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R1");
} else {
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 {
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");
perfTOInput("R3");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R4");
perfTOInput("R4");
} else if (getprop("/MCDU[0]/page") == "RADNAV") {
radnavInput("R4");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R5");
perfTOInput("R5");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[0]/page") == "TO") {
PerfTOInput("R6");
perfTOInput("R6");
} else if (getprop("/MCDU[0]/page") == "CLB") {
perfCLBInput("R6");
} # else if (getprop("/MCDU[0]/page") == "CRZ") {
# perfCRZInput("R6");
#}
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
}
}
}
@ -434,7 +470,7 @@ var initInputB = func(key) {
}
}
var PerfTOInput = func(key) {
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[0]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {

View file

@ -53,41 +53,58 @@ var lskbutton = func(btn) {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "GPS PRIMARY");
} else if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("L1");
perfTOInput("L1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L1");
} else {
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");
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 {
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");
perfTOInput("L3");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L3");
} else {
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");
perfTOInput("L4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("L4");
} else {
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");
perfTOInput("L5");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("L5");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[1]/page") == "INITA") {
@ -96,6 +113,9 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[1]/page") == "CRZ") {
perfCRZInput("L6");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
@ -110,37 +130,53 @@ var rskbutton = func(btn) {
initInputA("R1");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R1");
} else {
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 {
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");
perfTOInput("R3");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "4") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R4");
perfTOInput("R4");
} else if (getprop("/MCDU[1]/page") == "RADNAV") {
radnavInput("R4");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "5") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R5");
perfTOInput("R5");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
} else if (btn == "6") {
if (getprop("/MCDU[1]/page") == "TO") {
PerfTOInput("R6");
perfTOInput("R6");
} else if (getprop("/MCDU[1]/page") == "CLB") {
perfCLBInput("R6");
} # else if (getprop("/MCDU[1]/page") == "CRZ") {
# perfCRZInput("R6");
#}
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
}
}
}
@ -434,7 +470,7 @@ var initInputB = func(key) {
}
}
var PerfTOInput = func(key) {
var perfTOInput = func(key) {
var scratchpad = getprop("/MCDU[1]/scratchpad");
if (key == "L1") {
if (scratchpad == "CLR") {