System: APU Bleed now makes APU wait 1min before shutdown, fixes #10
This commit is contained in:
parent
08a4e08492
commit
198298c270
7 changed files with 36 additions and 16 deletions
|
@ -229,9 +229,6 @@ var colddark_b = func {
|
|||
# Continues the Cold and Dark script, after engines fully shutdown.
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
setprop("/controls/gear/brake-left", 0);
|
||||
setprop("/controls/gear/brake-right", 0);
|
||||
setprop("/systems/acconfig/autoconfig-running", 0);
|
||||
|
@ -265,9 +262,6 @@ var beforestart = func {
|
|||
failReset();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/bleed/OHP/bleedapu", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
|
@ -343,8 +337,6 @@ var taxi = func {
|
|||
failReset();
|
||||
setprop("/controls/APU/master", 0);
|
||||
setprop("/controls/APU/start", 0);
|
||||
setprop("/controls/electrical/switches/battery1", 0);
|
||||
setprop("/controls/electrical/switches/battery2", 0);
|
||||
|
||||
# Now the Startup!
|
||||
setprop("/controls/electrical/switches/battery1", 1);
|
||||
|
|
|
@ -31,6 +31,7 @@ setprop("/controls/engines/engine[1]/last-igniter", "B");
|
|||
var eng_init = func {
|
||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
||||
eng_common_init();
|
||||
}
|
||||
|
||||
# Trigger Startups and Stops
|
||||
|
|
|
@ -17,6 +17,13 @@ var apu_egt_min = 352;
|
|||
var apu_egt_max = 704;
|
||||
setprop("/systems/apu/rpm", 0);
|
||||
setprop("/systems/apu/egt", 42);
|
||||
setprop("/systems/apu/bleed-used", 0);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
setprop("/systems/apu/bleed-time", 0);
|
||||
|
||||
var eng_common_init = func {
|
||||
setprop("/systems/apu/bleed-used", 0);
|
||||
}
|
||||
|
||||
# Start APU
|
||||
setlistener("/controls/APU/start", func {
|
||||
|
@ -60,10 +67,31 @@ setlistener("/controls/APU/master", func {
|
|||
});
|
||||
|
||||
var apu_stop = func {
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") != 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) {
|
||||
apuBleedChk.start();
|
||||
} else {
|
||||
apuBleedChk.stop();
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
}
|
||||
}
|
||||
|
||||
var apuBleedChk = maketimer(0.1, func {
|
||||
if (getprop("/systems/apu/bleed-used") == 1 and getprop("/systems/apu/bleed-counting") == 1) {
|
||||
if (getprop("/systems/apu/bleed-time") + 60 <= getprop("/sim/time/elapsed-sec")) {
|
||||
apuBleedChk.stop();
|
||||
interpolate("/systems/apu/rpm", 0, 30);
|
||||
interpolate("/systems/apu/egt", 42, 40);
|
||||
setprop("/systems/apu/bleed-counting", 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
# Various Other Stuff
|
||||
var doIdleThrust = func {
|
||||
setprop("/controls/engines/engine[0]/throttle", 0.0);
|
||||
|
|
|
@ -31,6 +31,7 @@ setprop("/controls/engines/engine[1]/last-igniter", "B");
|
|||
var eng_init = func {
|
||||
setprop("/controls/engines/engine[0]/man-start", 0);
|
||||
setprop("/controls/engines/engine[1]/man-start", 0);
|
||||
eng_common_init();
|
||||
}
|
||||
|
||||
# Trigger Startups and Stops
|
||||
|
|
|
@ -16,9 +16,6 @@ setprop("/controls/lighting/ndl-norm", 1);
|
|||
setprop("/controls/lighting/ndr-norm", 1);
|
||||
setprop("/controls/lighting/upper-norm", 1);
|
||||
|
||||
# Surprise
|
||||
setprop("/controls/tray/surprise", 1);
|
||||
|
||||
# Lights
|
||||
setprop("/sim/model/lights/nose-lights", 0);
|
||||
setprop("/sim/model/lights/turnoffsw", 0);
|
||||
|
|
|
@ -200,6 +200,7 @@ 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);
|
||||
} else {
|
||||
setprop("/systems/pneumatic/bleedapu", 0);
|
||||
}
|
||||
|
@ -372,10 +373,10 @@ var PNEU = {
|
|||
acess = getprop("/systems/electrical/bus/ac-ess");
|
||||
fanon = getprop("/systems/ventilation/avionics/fan");
|
||||
|
||||
if ((dcess > 25) or (acess > 110)) {
|
||||
if (dcess > 25 or acess > 110) {
|
||||
setprop("/systems/ventilation/avionics/fan", 1);
|
||||
setprop("/systems/ventilation/lavatory/extractfan", 1);
|
||||
} else if ((dcess == 0) and (acess == 0)) {
|
||||
} else if (dcess == 0 and acess == 0) {
|
||||
setprop("/systems/ventilation/avionics/fan", 0);
|
||||
setprop("/systems/ventilation/lavatory/extractfan", 0);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
4657
|
||||
4658
|
Reference in a new issue