diff --git a/Nasal/engines-common.nas b/Nasal/engines-common.nas index 685e3fc3..b238dda1 100644 --- a/Nasal/engines-common.nas +++ b/Nasal/engines-common.nas @@ -68,21 +68,23 @@ setlistener("/controls/APU/master", func { } else if (getprop("/controls/APU/master") == 1) { apuBleedChk.stop(); setprop("/systems/apu/bleed-counting", 0); + setprop("/systems/apu/bleed-used", 0); } }); 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-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(); } else { apuBleedChk.stop(); interpolate("/systems/apu/rpm", 0, 30); interpolate("/systems/apu/egt", 42, 40); 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/egt", 42, 40); setprop("/systems/apu/bleed-counting", 0); + setprop("/systems/apu/bleed-used", 0); } } }); diff --git a/Nasal/pneumatics.nas b/Nasal/pneumatics.nas index e03b960e..99d3724d 100644 --- a/Nasal/pneumatics.nas +++ b/Nasal/pneumatics.nas @@ -198,7 +198,9 @@ var PNEU = { # Air Sources/PSI if (rpmapu >= 94.9 and bleedapu_sw and !bleedapu_fail) { setprop("/systems/pneumatic/bleedapu", 34); - setprop("/systems/apu/bleed-used", 1); + if (getprop("/controls/APU/master") == 1) { + setprop("/systems/apu/bleed-used", 1); + } } else { setprop("/systems/pneumatic/bleedapu", 0); } diff --git a/revision.txt b/revision.txt index 0856adc1..5a5c91b0 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -4700 \ No newline at end of file +4701 \ No newline at end of file