System: Fix APU Bleed delay bug, and staying on after acconfig panel load, fixes #51
This commit is contained in:
parent
85231ca1a3
commit
c8245c7a41
3 changed files with 9 additions and 4 deletions
|
@ -68,21 +68,23 @@ setlistener("/controls/APU/master", func {
|
||||||
} else if (getprop("/controls/APU/master") == 1) {
|
} else if (getprop("/controls/APU/master") == 1) {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("/systems/apu/bleed-counting", 0);
|
||||||
|
setprop("/systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var apu_stop = func {
|
var apu_stop = func {
|
||||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 1) {
|
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
|
||||||
setprop("/systems/apu/bleed-counting", 1);
|
setprop("/systems/apu/bleed-counting", 1);
|
||||||
setprop("/systems/apu/bleed-time", getprop("/sim/time/elapsed-sec"));
|
setprop("/systems/apu/bleed-time", getprop("/sim/time/elapsed-sec"));
|
||||||
}
|
}
|
||||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
|
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1 and getprop("/systems/acconfig/autoconfig-running") != 1) {
|
||||||
apuBleedChk.start();
|
apuBleedChk.start();
|
||||||
} else {
|
} else {
|
||||||
apuBleedChk.stop();
|
apuBleedChk.stop();
|
||||||
interpolate("/systems/apu/rpm", 0, 30);
|
interpolate("/systems/apu/rpm", 0, 30);
|
||||||
interpolate("/systems/apu/egt", 42, 40);
|
interpolate("/systems/apu/egt", 42, 40);
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("/systems/apu/bleed-counting", 0);
|
||||||
|
setprop("/systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,6 +95,7 @@ var apuBleedChk = maketimer(0.1, func {
|
||||||
interpolate("/systems/apu/rpm", 0, 30);
|
interpolate("/systems/apu/rpm", 0, 30);
|
||||||
interpolate("/systems/apu/egt", 42, 40);
|
interpolate("/systems/apu/egt", 42, 40);
|
||||||
setprop("/systems/apu/bleed-counting", 0);
|
setprop("/systems/apu/bleed-counting", 0);
|
||||||
|
setprop("/systems/apu/bleed-used", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -198,7 +198,9 @@ var PNEU = {
|
||||||
# Air Sources/PSI
|
# Air Sources/PSI
|
||||||
if (rpmapu >= 94.9 and bleedapu_sw and !bleedapu_fail) {
|
if (rpmapu >= 94.9 and bleedapu_sw and !bleedapu_fail) {
|
||||||
setprop("/systems/pneumatic/bleedapu", 34);
|
setprop("/systems/pneumatic/bleedapu", 34);
|
||||||
setprop("/systems/apu/bleed-used", 1);
|
if (getprop("/controls/APU/master") == 1) {
|
||||||
|
setprop("/systems/apu/bleed-used", 1);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
setprop("/systems/pneumatic/bleedapu", 0);
|
setprop("/systems/pneumatic/bleedapu", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4700
|
4701
|
Reference in a new issue