fix pneu and fadec bug, also add DES nasal and xml

This commit is contained in:
Jonathan Redpath 2017-06-15 19:45:59 +01:00
parent 1e87bb95d1
commit 649c61b2f0
6 changed files with 89 additions and 6 deletions

View file

@ -202,6 +202,28 @@
</condition>
</model>
<model>
<name>DES</name>
<path>PERF/DES/DES.xml</path>
<offsets>
<heading-deg>180</heading-deg>
<roll-deg>180</roll-deg>
<pitch-deg>90</pitch-deg>
</offsets>
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac1</property>
<value>110</value>
</greater-than-equals>
<equals>
<property>/MCDU[0]/page</property>
<value>DES</value>
</equals>
</and>
</condition>
</model>
<model>
<name>DATA2</name>
<path>DATA2/DATA2.xml</path>

View file

@ -202,6 +202,28 @@
</condition>
</model>
<model>
<name>DES</name>
<path>PERF/DES/DES.xml</path>
<offsets>
<heading-deg>180</heading-deg>
<roll-deg>180</roll-deg>
<pitch-deg>90</pitch-deg>
</offsets>
<condition>
<and>
<greater-than-equals>
<property>/systems/electrical/bus/ac2</property>
<value>110</value>
</greater-than-equals>
<equals>
<property>/MCDU[1]/page</property>
<value>DES</value>
</equals>
</and>
</condition>
</model>
<model>
<name>DATA2</name>
<path>DATA2/DATA2.xml</path>

View file

@ -69,6 +69,10 @@ var lskbutton = func(btn) {
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 {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
@ -102,6 +106,10 @@ var lskbutton = func(btn) {
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 {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
@ -113,6 +121,8 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[0]/page") == "CRZ") {
perfCRZInput("L6");
} else if (getprop("/MCDU[0]/page") == "DES") {
perfDESInput("L6");
} else {
setprop("/MCDU[0]/scratchpad-msg", "1");
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
@ -173,6 +183,8 @@ var rskbutton = func(btn) {
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");
@ -688,9 +700,15 @@ var perfCRZInput = func(key) {
if (key == "L6") {
setprop("/MCDU[0]/page", "CLB");
}
# if (key == "R6") {
# setprop("/MCDU[0]/page", "DES");
# }
if (key == "R6") {
setprop("/MCDU[0]/page", "DES");
}
}
var perfDESInput = func(key) {
if (key == "L6") {
setprop("/MCDU[0]/page", "CRZ");
}
}
var arrowbutton = func(btn) {

View file

@ -69,6 +69,10 @@ var lskbutton = func(btn) {
radnavInput("L2");
} else if (getprop("/MCDU[1]/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 {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
@ -102,6 +106,10 @@ var lskbutton = func(btn) {
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 {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
@ -113,6 +121,8 @@ var lskbutton = func(btn) {
perfCLBInput("L6");
} else if (getprop("/MCDU[1]/page") == "CRZ") {
perfCRZInput("L6");
} else if (getprop("/MCDU[0]/page") == "DES") {
perfDESInput("L6");
} else {
setprop("/MCDU[1]/scratchpad-msg", "1");
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
@ -173,6 +183,8 @@ var rskbutton = func(btn) {
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");
@ -688,9 +700,15 @@ var perfCRZInput = func(key) {
if (key == "L6") {
setprop("/MCDU[1]/page", "CLB");
}
# if (key == "R6") {
# setprop("/MCDU[1]/page", "DES");
# }
if (key == "R6") {
setprop("/MCDU[1]/page", "DES");
}
}
var perfDESInput = func(key) {
if (key == "L6") {
setprop("/MCDU[1]/page", "CRZ");
}
}
var arrowbutton = func(btn) {

View file

@ -23,6 +23,7 @@ setlistener("/sim/signals/fdm-initialized", func {
setprop("/systems/thrust/mct-lim", 0.0);
setprop("/systems/thrust/clb-lim", 0.0);
setprop("/systems/thrust/lim-flex", 0);
setprop("/engines/flex-derate", 0);
thrustt.start();
});

View file

@ -51,6 +51,8 @@ var pneu_init = func {
setprop("/systems/ventilation/avionics/inletvalve", "0");
setprop("/systems/ventilation/lavatory/extractfan", 0);
setprop("/systems/ventilation/lavatory/extractvalve", "0");
setprop("/systems/pressurization/ambientpsi", "0");
setprop("/systems/pressurization/cabinpsi", "0");
pneu_timer.start();
}