if (elec == 1 and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-1-inhibit", 1);
} else if (stateL == 3 or stateR == 3 and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-1-inhibit", 0);
setprop("/ECAM/phase-2-inhibit", 1);
} else if (thrustL == "FLX" or thrustL == "TOGA" or thrustR == "FLX" or thrustR == "TOGA" and speed < 80 and !phase1inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-2-inhibit", 0);
setprop("/ECAM/phase-3-inhibit", 1);
} else if (thrustL == "FLX" or thrustL == "TOGA" or thrustR == "FLX" or thrustR == "TOGA" and speed > 80 and wowL and !phase1inhibit and !phase2inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-3-inhibit", 0);
setprop("/ECAM/phase-4-inhibit", 1);
} else if (speed > 80 and !wowL and altitude < 1501 and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-4-inhibit", 0);
setprop("/ECAM/phase-5-inhibit", 1);
} else if (speed > 80 and !wowL and altitude > 1501 and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-5-inhibit", 0);
setprop("/ECAM/phase-6-inhibit", 1);
} else if (speed > 80 and !wowL and altitude < 801 and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase7inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-6-inhibit", 0);
setprop("/ECAM/phase-7-inhibit", 1);
} else if (speed > 80 and wowL and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase8inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-7-inhibit", 0);
setprop("/ECAM/phase-8-inhibit", 1);
} else if (speed < 80 and wowL and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase9inhibit and !phase10inhibit) {
setprop("/ECAM/phase-8-inhibit", 0);
setprop("/ECAM/phase-9-inhibit", 1);
} else if (stateL == 0 and stateR == 0 and !phase1inhibit and !phase2inhibit and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase6inhibit and !phase7inhibit and !phase8inhibit and !phase10inhibit) {
setprop("/ECAM/phase-9-inhibit", 0);
setprop("/ECAM/phase-10-inhibit", 1);
}
############
# Air Cond #
############
if (getprop("/systems/failures/pack1") == 1 and getprop("/systems/failures/pack2") == 0 and getprop("/controls/pneumatic/switches/pack1") == 1 and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase7inhibit and !phase8inhibit) {
setprop("/ECAM/msg/line1", "AIR PACK 1 FAULT");
setprop("/ECAM/msg/line2", " - PACK 1: OFF");
setprop("/ECAM/msg/line3", "");
setprop("/ECAM/msg/line4", "");
setprop("/ECAM/msg/line5", "");
setprop("/ECAM/msg/line6", "");
setprop("/ECAM/msg/line7", "");
setprop("/ECAM/msg/line8", "");
setprop("/ECAM/msg/line1c", "a");
setprop("/ECAM/msg/line2c", "b");
setprop("/ECAM/msg/line3c", "g");
setprop("/ECAM/msg/line4c", "g");
setprop("/ECAM/msg/line5c", "g");
setprop("/ECAM/msg/line6c", "g");
setprop("/ECAM/msg/line7c", "g");
setprop("/ECAM/msg/line8c", "g");
setprop("/ECAM/left-msg", "MSG");
} else if (getprop("/systems/failures/pack1") == 1 and getprop("/systems/failures/pack2") == 0 and getprop("/controls/pneumatic/switches/pack1") == 0 and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase7inhibit and !phase8inhibit) {
setprop("/ECAM/msg/line1", "AIR PACK 1 FAULT");
setprop("/ECAM/msg/line2", "");
setprop("/ECAM/msg/line3", "");
setprop("/ECAM/msg/line4", "");
setprop("/ECAM/msg/line5", "");
setprop("/ECAM/msg/line6", "");
setprop("/ECAM/msg/line7", "");
setprop("/ECAM/msg/line8", "");
setprop("/ECAM/msg/line1c", "a");
setprop("/ECAM/msg/line2c", "g");
setprop("/ECAM/msg/line3c", "g");
setprop("/ECAM/msg/line4c", "g");
setprop("/ECAM/msg/line5c", "g");
setprop("/ECAM/msg/line6c", "g");
setprop("/ECAM/msg/line7c", "g");
setprop("/ECAM/msg/line8c", "g");
setprop("/ECAM/left-msg", "MSG");
} else {
# MSGclr();
}
if (getprop("/systems/failures/pack1") == 0 and getprop("/systems/failures/pack2") == 1 and getprop("/controls/pneumatic/switches/pack2") == 1 and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase7inhibit and !phase8inhibit) {
setprop("/ECAM/msg/line1", "AIR PACK 2 FAULT");
setprop("/ECAM/msg/line2", " - PACK 2: OFF");
setprop("/ECAM/msg/line3", "");
setprop("/ECAM/msg/line4", "");
setprop("/ECAM/msg/line5", "");
setprop("/ECAM/msg/line6", "");
setprop("/ECAM/msg/line7", "");
setprop("/ECAM/msg/line8", "");
setprop("/ECAM/msg/line1c", "a");
setprop("/ECAM/msg/line2c", "b");
setprop("/ECAM/msg/line3c", "g");
setprop("/ECAM/msg/line4c", "g");
setprop("/ECAM/msg/line5c", "g");
setprop("/ECAM/msg/line6c", "g");
setprop("/ECAM/msg/line7c", "g");
setprop("/ECAM/msg/line8c", "g");
setprop("/ECAM/left-msg", "MSG");
} else if (getprop("/systems/failures/pack1") == 0 and getprop("/systems/failures/pack2") == 1 and getprop("/controls/pneumatic/switches/pack2") == 0 and !phase3inhibit and !phase4inhibit and !phase5inhibit and !phase7inhibit and !phase8inhibit) {