Merge branch 'master' into ECAM3

This commit is contained in:
legoboyvdlp R 2019-03-15 12:28:53 +00:00
commit 95be0a6fbe
14 changed files with 1041 additions and 1467 deletions

View file

@ -3226,7 +3226,7 @@
<value>1</value> <value>1</value>
</equals> </equals>
<equals> <equals>
<property>it-autoflight/input/lat-arm</property> <property>it-autoflight/output/lnav-armed</property>
<value>1</value> <value>1</value>
</equals> </equals>
</or> </or>

File diff suppressed because it is too large Load diff

View file

@ -33,7 +33,7 @@ setprop("/modes/pfd/fma/roll-mode-armed-time", 0);
setprop("/modes/pfd/fma/ap-mode-time", 0); setprop("/modes/pfd/fma/ap-mode-time", 0);
setprop("/modes/pfd/fma/fd-mode-time", 0); setprop("/modes/pfd/fma/fd-mode-time", 0);
setprop("/modes/pfd/fma/athr-mode-time", 0); setprop("/modes/pfd/fma/athr-mode-time", 0);
setprop("/modes/fcu/hdg-time", 0); setprop("/modes/fcu/hdg-time", -45);
setlistener("sim/signals/fdm-initialized", func { setlistener("sim/signals/fdm-initialized", func {
loopFMA.start(); loopFMA.start();
@ -126,20 +126,17 @@ var loopFMA = maketimer(0.05, func {
if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) { if (((state1 == "TOGA" or state2 == "TOGA") or (flx == 1 and (state1 == "MCT" or state2 == "MCT")) or (flx == 1 and ((state1 == "MAN THR" and thr1 >= 0.83) or (state2 == "MAN THR" and thr2 >= 0.83)))) and (engstate1 == 3 or engstate2 == 3)) {
# RWY Engagement would go here, but automatic ILS selection is not simulated yet. # RWY Engagement would go here, but automatic ILS selection is not simulated yet.
if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) { if (wow and getprop("/FMGC/internal/v2-set") == 1 and getprop("/it-autoflight/output/vert") != 7) {
setprop("/it-autoflight/input/vert", 7); ITAF.setVertMode(7);
setprop("/it-autoflight/mode/vert", "T/O CLB"); setprop("/it-autoflight/mode/vert", "T/O CLB");
fmgc.vertical();
} }
} else { } else {
var gear1 = getprop("/gear/gear[1]/wow"); var gear1 = getprop("/gear/gear[1]/wow");
var gear2 = getprop("/gear/gear[2]/wow"); var gear2 = getprop("/gear/gear[2]/wow");
if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) { if (getprop("/it-autoflight/input/lat") == 5 and (gear1 or gear2)) {
setprop("/it-autoflight/input/lat", 9); ITAF.setLatMode(9);
fmgc.lateral();
} }
if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) { if (getprop("/it-autoflight/output/vert") == 7 and (gear1 or gear2)) {
setprop("/it-autoflight/input/vert", 9); ITAF.setVertMode(9);
fmgc.vertical();
} }
} }
@ -201,13 +198,6 @@ var loopFMA = maketimer(0.05, func {
} else { } else {
setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0); setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
} }
# Preselect HDG
if (getprop("/modes/fcu/hdg-time") + 45 >= elapsedtime) {
setprop("/it-autoflight/custom/show-hdg", 1);
} else if (getprop("/it-autoflight/output/lat") != 0 and getprop("/it-autoflight/output/lat") != 5 and getprop("/it-autoflight/output/lat") != 9) {
setprop("/it-autoflight/custom/show-hdg", 0);
}
}); });
var loopFMA_b = func { var loopFMA_b = func {
@ -344,34 +334,6 @@ setlistener("/it-autoflight/mode/vert", func {
if (newvertarm != "ALT") { if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT"); setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
} }
} else if (vert == "MNG HLD") {
if (newvert != "ALT") {
setprop("/modes/pfd/fma/pitch-mode", "ALT");
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "MNG CAP") {
if (newvert != "ALT*") {
setprop("/modes/pfd/fma/pitch-mode", "ALT*");
}
if (newvertarm != " ") {
setprop("/modes/pfd/fma/pitch-mode2-armed", " ");
}
} else if (vert == "MNG CLB") {
if (newvert != "CLB") {
setprop("/modes/pfd/fma/pitch-mode", "CLB");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == "MNG DES") {
if (newvert != "DES") {
setprop("/modes/pfd/fma/pitch-mode", "DES");
}
if (newvertarm != "ALT") {
setprop("/modes/pfd/fma/pitch-mode2-armed", "ALT");
}
} else if (vert == " ") { } else if (vert == " ") {
if (newvert != " ") { if (newvert != " ") {
setprop("/modes/pfd/fma/pitch-mode", " "); setprop("/modes/pfd/fma/pitch-mode", " ");
@ -532,21 +494,7 @@ var at = func {
} }
var boxchk = func { var boxchk = func {
var ap1 = getprop("/it-autoflight/output/ap1"); if ((getprop("/it-autoflight/output/ap1") or getprop("/it-autoflight/output/ap2") or getprop("/it-autoflight/output/fd1") or getprop("/it-autoflight/output/fd2")) and getprop("/it-autoflight/output/fma-pwr") == 0) {
var ap2 = getprop("/it-autoflight/output/ap2");
var fd1 = getprop("/it-autoflight/output/fd1");
var fd2 = getprop("/it-autoflight/output/fd2");
var fma_pwr = getprop("/it-autoflight/output/fma-pwr");
if (ap1 and !ap2 and !fd1 and !fd2 and !fma_pwr) {
setprop("/it-autoflight/input/lat", 3);
boxchk_b();
} else if (!ap1 and ap2 and !fd1 and !fd2 and !fma_pwr) {
setprop("/it-autoflight/input/lat", 3);
boxchk_b();
} else if (!ap1 and !ap2 and fd1 and !fd2 and !fma_pwr) {
setprop("/it-autoflight/input/lat", 3);
boxchk_b();
} else if (!ap1 and !ap2 and !fd1 and fd2 and !fma_pwr) {
setprop("/it-autoflight/input/lat", 3); setprop("/it-autoflight/input/lat", 3);
boxchk_b(); boxchk_b();
} }

View file

@ -300,7 +300,7 @@ var reset_FMGC = func {
spd = getprop("/it-autoflight/input/spd-kts"); spd = getprop("/it-autoflight/input/spd-kts");
hdg = getprop("/it-autoflight/input/hdg"); hdg = getprop("/it-autoflight/input/hdg");
alt = getprop("/it-autoflight/input/alt"); alt = getprop("/it-autoflight/input/alt");
APinit(); ITAF.init();
FMGCinit(); FMGCinit();
mcdu.MCDU_reset(0); mcdu.MCDU_reset(0);
mcdu.MCDU_reset(1); mcdu.MCDU_reset(1);
@ -353,9 +353,6 @@ var various2 = maketimer(0.5, func {
nav3(); nav3();
adf0(); adf0();
adf1(); adf1();
if (getprop("/it-autoflight/output/lat") == 0) {
setprop("/it-autoflight/custom/show-hdg", 1);
}
}); });
var nav0 = func { var nav0 = func {

View file

@ -52,7 +52,7 @@ var variousReset = func {
setprop("/controls/lighting/DU/du6", 1); setprop("/controls/lighting/DU/du6", 1);
setprop("/controls/lighting/DU/mcdu1", 1); setprop("/controls/lighting/DU/mcdu1", 1);
setprop("/controls/lighting/DU/mcdu2", 1); setprop("/controls/lighting/DU/mcdu2", 1);
setprop("/modes/fcu/hdg-time", 0); setprop("/modes/fcu/hdg-time", -45);
setprop("/controls/switching/ATTHDG", 0); setprop("/controls/switching/ATTHDG", 0);
setprop("/controls/switching/AIRDATA", 0); setprop("/controls/switching/AIRDATA", 0);
setprop("/controls/switches/no-smoking-sign", 1); setprop("/controls/switches/no-smoking-sign", 1);
@ -358,10 +358,8 @@ var APPanel = {
if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) { if (fd1.getBoolValue() or fd2.getBoolValue() or ap1.getBoolValue() or ap2.getBoolValue()) {
if (latMode.getValue() == 0 or !showHDG.getBoolValue()) { if (latMode.getValue() == 0 or !showHDG.getBoolValue()) {
setprop("/it-autoflight/input/lat", 3); setprop("/it-autoflight/input/lat", 3);
showHDG.setBoolValue(1);
} else { } else {
setprop("/it-autoflight/input/lat", 0); setprop("/it-autoflight/input/lat", 0);
showHDG.setBoolValue(1);
} }
} }
} }
@ -399,26 +397,26 @@ var APPanel = {
if (latMode.getValue() == 2) { if (latMode.getValue() == 2) {
setprop("/it-autoflight/input/lat", 0); setprop("/it-autoflight/input/lat", 0);
} else { } else {
fmgc.disarmLOC(); fmgc.ITAF.disarmLOC();
} }
if (vertTemp == 2 or vertTemp == 6) { if (vertTemp == 2 or vertTemp == 6) {
me.VSPull(); me.VSPull();
} else { } else {
fmgc.disarmGS(); fmgc.ITAF.disarmGS();
} }
} else { } else {
setprop("/it-autoflight/input/lat", 2); setprop("/it-autoflight/input/lat", 2);
if (vertTemp == 2 or vertTemp == 6) { if (vertTemp == 2 or vertTemp == 6) {
me.VSPull(); me.VSPull();
} else { } else {
fmgc.disarmGS(); fmgc.ITAF.disarmGS();
} }
} }
} }
}, },
TRKFPA: func() { TRKFPA: func() {
if (dcEss.getValue() >= 25) { if (dcEss.getValue() >= 25) {
fmgc.toggle_trkfpa(); fmgc.ITAF.toggleTrkFpa();
} }
}, },
ALTPush: func() { ALTPush: func() {
@ -535,12 +533,12 @@ var APPanel = {
if (latMode.getValue() == 2) { if (latMode.getValue() == 2) {
setprop("/it-autoflight/input/lat", 0); setprop("/it-autoflight/input/lat", 0);
} else { } else {
fmgc.disarmLOC(); fmgc.ITAF.disarmLOC();
} }
if (vertTemp == 2 or vertTemp == 6) { if (vertTemp == 2 or vertTemp == 6) {
me.VSPull(); me.VSPull();
} else { } else {
fmgc.disarmGS(); fmgc.ITAF.disarmGS();
} }
} else { } else {
setprop("/it-autoflight/input/vert", 2); setprop("/it-autoflight/input/vert", 2);

View file

@ -256,7 +256,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0); setprop("/controls/engines/engine[0]/igniter-b", 0);
} }
} }
if (getprop("/engines/engine[0]/n2-actual") >= 61.1) { if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
eng_one_n2_check.stop(); eng_one_n2_check.stop();
setprop("/systems/pneumatic/eng1-starter", 0); setprop("/systems/pneumatic/eng1-starter", 0);
setprop("/engines/engine[0]/state", 3); setprop("/engines/engine[0]/state", 3);
@ -319,7 +319,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0); setprop("/controls/engines/engine[1]/igniter-b", 0);
} }
} }
if (getprop("/engines/engine[1]/n2-actual") >= 61.1) { if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
eng_two_n2_check.stop(); eng_two_n2_check.stop();
setprop("/systems/pneumatic/eng2-starter", 0); setprop("/systems/pneumatic/eng2-starter", 0);
setprop("/engines/engine[1]/state", 3); setprop("/engines/engine[1]/state", 3);

View file

@ -256,7 +256,7 @@ var eng_one_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[0]/igniter-b", 0); setprop("/controls/engines/engine[0]/igniter-b", 0);
} }
} }
if (getprop("/engines/engine[0]/n2-actual") >= 60.8) { if (getprop("/engines/engine[0]/n2-actual") >= 57.0) {
eng_one_n2_check.stop(); eng_one_n2_check.stop();
setprop("/systems/pneumatic/eng1-starter", 0); setprop("/systems/pneumatic/eng1-starter", 0);
setprop("/engines/engine[0]/state", 3); setprop("/engines/engine[0]/state", 3);
@ -319,7 +319,7 @@ var eng_two_n2_check = maketimer(0.5, func {
setprop("/controls/engines/engine[1]/igniter-b", 0); setprop("/controls/engines/engine[1]/igniter-b", 0);
} }
} }
if (getprop("/engines/engine[1]/n2-actual") >= 60.8) { if (getprop("/engines/engine[1]/n2-actual") >= 57.0) {
eng_two_n2_check.stop(); eng_two_n2_check.stop();
setprop("/systems/pneumatic/eng2-starter", 0); setprop("/systems/pneumatic/eng2-starter", 0);
setprop("/engines/engine[1]/state", 3); setprop("/engines/engine[1]/state", 3);

View file

@ -192,7 +192,7 @@ var systemsInit = func {
systems.fire_init(); systems.fire_init();
systems.autobrake_init(); systems.autobrake_init();
fadec.FADEC.init(); fadec.FADEC.init();
fmgc.APinit(); fmgc.ITAF.init();
fmgc.FMGCinit(); fmgc.FMGCinit();
mcdu.MCDU_init(0); mcdu.MCDU_init(0);
mcdu.MCDU_init(1); mcdu.MCDU_init(1);
@ -235,10 +235,6 @@ var systemsLoop = maketimer(0.1, func {
setprop("/systems/shake/effect", 0); setprop("/systems/shake/effect", 0);
} }
if (getprop("/it-autoflight/custom/show-hdg") == 0 and getprop("/it-autoflight/output/lat") != 4) {
setprop("/it-autoflight/input/hdg", math.round(getprop("/instrumentation/pfd/heading-scale")));
}
if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("/controls/flight/flap-pos") >= 4)) { if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 or (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1 and getprop("/controls/flight/flap-pos") >= 4)) {
setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1); setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override", 1);
} else { } else {

View file

@ -382,10 +382,16 @@
<value>MAN</value> <value>MAN</value>
</equals> </equals>
</or> </or>
<or>
<equals> <equals>
<property>/it-autoflight/output/thr-mode</property> <property>/it-autoflight/output/thr-mode</property>
<value>0</value> <value>0</value>
</equals> </equals>
<equals>
<property>/it-autoflight/mode/thr</property>
<value>RETARD</value>
</equals>
</or>
</and> </and>
</condition> </condition>
<value>0.3</value> <value>0.3</value>
@ -594,10 +600,16 @@
<value>MAN</value> <value>MAN</value>
</equals> </equals>
</or> </or>
<or>
<equals> <equals>
<property>/it-autoflight/output/thr-mode</property> <property>/it-autoflight/output/thr-mode</property>
<value>0</value> <value>0</value>
</equals> </equals>
<equals>
<property>/it-autoflight/mode/thr</property>
<value>RETARD</value>
</equals>
</or>
</and> </and>
</condition> </condition>
<value>0.3</value> <value>0.3</value>

View file

@ -670,10 +670,16 @@
<value>MAN</value> <value>MAN</value>
</equals> </equals>
</or> </or>
<or>
<equals> <equals>
<property>/it-autoflight/output/thr-mode</property> <property>/it-autoflight/output/thr-mode</property>
<value>0</value> <value>0</value>
</equals> </equals>
<equals>
<property>/it-autoflight/mode/thr</property>
<value>RETARD</value>
</equals>
</or>
</and> </and>
</condition> </condition>
<value>0.3</value> <value>0.3</value>
@ -882,10 +888,16 @@
<value>MAN</value> <value>MAN</value>
</equals> </equals>
</or> </or>
<or>
<equals> <equals>
<property>/it-autoflight/output/thr-mode</property> <property>/it-autoflight/output/thr-mode</property>
<value>0</value> <value>0</value>
</equals> </equals>
<equals>
<property>/it-autoflight/mode/thr</property>
<value>RETARD</value>
</equals>
</or>
</and> </and>
</condition> </condition>
<value>0.3</value> <value>0.3</value>

View file

@ -506,6 +506,16 @@
<max-rate-of-change> <max-rate-of-change>
<condition> <condition>
<and> <and>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<equals> <equals>
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>1</value> <value>1</value>
@ -570,16 +580,6 @@
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>7</value> <value>7</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or> </or>
<or> <or>
<equals> <equals>

View file

@ -143,16 +143,6 @@
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>7</value> <value>7</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or> </or>
<or> <or>
<equals> <equals>
@ -352,22 +342,10 @@
<gain>1.0</gain> <gain>1.0</gain>
<input> <input>
<condition> <condition>
<or>
<equals> <equals>
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>0</value> <value>0</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>0</value>
</equals>
</and>
</or>
</condition> </condition>
<property>/it-autoflight/internal/target-fpm</property> <property>/it-autoflight/internal/target-fpm</property>
</input> </input>
@ -391,16 +369,6 @@
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>7</value> <value>7</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or> </or>
</condition> </condition>
<property>/it-autoflight/internal/target-fpm-b</property> <property>/it-autoflight/internal/target-fpm-b</property>
@ -501,22 +469,10 @@
<input>/it-autoflight/internal/vert-speed-fpm</input> <input>/it-autoflight/internal/vert-speed-fpm</input>
<reference> <reference>
<condition> <condition>
<or>
<equals> <equals>
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>0</value> <value>0</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>0</value>
</equals>
</and>
</or>
</condition> </condition>
<property>/it-autoflight/internal/target-fpm</property> <property>/it-autoflight/internal/target-fpm</property>
</reference> </reference>
@ -540,16 +496,6 @@
<property>/it-autoflight/output/vert</property> <property>/it-autoflight/output/vert</property>
<value>7</value> <value>7</value>
</equals> </equals>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>8</value>
</equals>
<equals>
<property>/it-autoflight/output/vert-mng</property>
<value>4</value>
</equals>
</and>
</or> </or>
</condition> </condition>
<property>/it-autoflight/internal/target-fpm-b</property> <property>/it-autoflight/internal/target-fpm-b</property>

View file

@ -284,7 +284,7 @@
</input> </input>
<input>0</input> <input>0</input>
<output>/fdm/jsbsim/fbw/fmgc/yaw-cmd</output> <!-- Inputs to the FBW Yaw --> <output>/fdm/jsbsim/fbw/fmgc/yaw-cmd</output> <!-- Inputs to the FBW Yaw -->
<max-rate-of-change>0.6</max-rate-of-change> <max-rate-of-change>1.2</max-rate-of-change>
</filter> </filter>
</PropertyList> </PropertyList>

View file

@ -1 +1 @@
4779 4780