diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index 8b7c4151..7fadeffa 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -157,6 +157,8 @@ var canvas_upperECAM_base = { me["ECAML1"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec1") == "r") { me["ECAML1"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec1") == "m") { + me["ECAML1"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec2") == "w") { @@ -169,6 +171,8 @@ var canvas_upperECAM_base = { me["ECAML2"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec2") == "r") { me["ECAML2"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec2") == "m") { + me["ECAML2"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec3") == "w") { @@ -181,6 +185,8 @@ var canvas_upperECAM_base = { me["ECAML3"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec3") == "r") { me["ECAML3"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec3") == "m") { + me["ECAML3"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec4") == "w") { @@ -193,6 +199,8 @@ var canvas_upperECAM_base = { me["ECAML4"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec4") == "r") { me["ECAML4"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec4") == "m") { + me["ECAML4"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec5") == "w") { @@ -205,6 +213,8 @@ var canvas_upperECAM_base = { me["ECAML5"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec5") == "r") { me["ECAML5"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec5") == "m") { + me["ECAML5"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec6") == "w") { @@ -217,6 +227,8 @@ var canvas_upperECAM_base = { me["ECAML6"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec6") == "r") { me["ECAML6"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec6") == "m") { + me["ECAML6"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec7") == "w") { @@ -229,6 +241,8 @@ var canvas_upperECAM_base = { me["ECAML7"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec7") == "r") { me["ECAML7"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec7") == "m") { + me["ECAML7"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/msg/linec8") == "w") { @@ -241,6 +255,8 @@ var canvas_upperECAM_base = { me["ECAML8"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/msg/linec8") == "r") { me["ECAML8"].setColor(1,0,0); + } else if (getprop("/ECAM/msg/linec8") == "m") { + me["ECAML8"].setColor(0.6901,0.3333,0.7450); } me["TO_Memo"].hide(); @@ -364,6 +380,8 @@ var canvas_upperECAM_base = { me["ECAMR1"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec1") == "r") { me["ECAMR1"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec1") == "m") { + me["ECAMR1"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec2") == "w") { @@ -376,6 +394,8 @@ var canvas_upperECAM_base = { me["ECAMR2"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec2") == "r") { me["ECAMR2"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec2") == "m") { + me["ECAMR2"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec3") == "w") { @@ -388,6 +408,8 @@ var canvas_upperECAM_base = { me["ECAMR3"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec3") == "r") { me["ECAMR3"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec3") == "m") { + me["ECAMR3"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec4") == "w") { @@ -400,6 +422,8 @@ var canvas_upperECAM_base = { me["ECAMR4"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec4") == "r") { me["ECAMR4"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec4") == "m") { + me["ECAMR4"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec5") == "w") { @@ -412,6 +436,8 @@ var canvas_upperECAM_base = { me["ECAMR5"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec5") == "r") { me["ECAMR5"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec5") == "m") { + me["ECAMR5"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec6") == "w") { @@ -424,6 +450,8 @@ var canvas_upperECAM_base = { me["ECAMR6"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec6") == "r") { me["ECAMR6"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec6") == "m") { + me["ECAMR6"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec7") == "w") { @@ -436,6 +464,8 @@ var canvas_upperECAM_base = { me["ECAMR7"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec7") == "r") { me["ECAMR7"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec7") == "m") { + me["ECAMR7"].setColor(0.6901,0.3333,0.7450); } if (getprop("/ECAM/rightmsg/linec8") == "w") { @@ -448,10 +478,10 @@ var canvas_upperECAM_base = { me["ECAMR8"].setColor(0.7333,0.3803,0); } else if (getprop("/ECAM/rightmsg/linec8") == "r") { me["ECAMR8"].setColor(1,0,0); + } else if (getprop("/ECAM/rightmsg/linec8") == "m") { + me["ECAMR8"].setColor(0.6901,0.3333,0.7450); } - me["TO_Memo"].hide(); - me["LDG_Memo"].hide(); me["ECAM_Right"].show(); } else { me["ECAM_Right"].hide(); diff --git a/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg b/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg index e0f1da29..cfb5c7fe 100644 --- a/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg +++ b/Models/Instruments/Upper-ECAM/res/cfm-eis2.svg @@ -42,7 +42,7 @@ id="namedview371" showgrid="false" inkscape:zoom="0.50000001" - inkscape:cx="206.17626" + inkscape:cx="659.36853" inkscape:cy="512.09207" inkscape:window-x="-8" inkscape:window-y="-8" @@ -1746,7 +1746,7 @@ + transform="translate(665.99997)"> + transform="translate(665.63937)"> = 3 and getprop("/FMGC/status/phase") <= 5) { + to_inhibit.active = 1; + } else { + to_inhibit.active = 0; + } + + if (getprop("/FMGC/status/phase") >= 7 and getprop("/FMGC/status/phase") <= 7) { + ldg_inhibit.active = 1; + } else { + ldg_inhibit.active = 0; + } + if (getprop("controls/flight/speedbrake-arm") == 1) { gnd_splrs.active = 1; } else { @@ -229,13 +248,54 @@ var messages_right_memo = func { } else { refuelg.active = 0; } - if (getprop("/consumables/fuel/total-fuel-lbs") < 6000 and getprop("/ECAM/left-msg") != "TO-MEMO" and getprop("/ECAM/left-msg") != "LDG-MEMO") { # assuming US short ton 2000lb fob_3T.active = 1; } else { fob_3T.active = 0; } + + if (getprop("/systems/fuel/x-feed") == 1 and getprop("controls/fuel/x-feed") == 1) { + fuelx.active = 1; + } else { + fuelx.active = 0; + } + + if (getprop("/FMGC/status/phase") >= 3 and getprop("/FMGC/status/phase") <= 5) { + fuelx.colour = "a"; + } else { + fuelx.colour = "g"; + } + + if (getprop("/controls/hydraulic/ptu") == 1 and ((getprop("/systems/hydraulic/yellow-psi") < 1450 and getprop("/systems/hydraulic/green-psi") > 1450 and getprop("/controls/hydraulic/elec-pump-yellow") == 0) or (getprop("/systems/hydraulic/yellow-psi") > 1450 and getprop("/systems/hydraulic/green-psi") < 1450))) { + ptu.active = 1; + } else { + ptu.active = 0; + } + + if (getprop("/controls/hydraulic/rat-deployed") == 1) { + rat.active = 1; + } else { + rat.active = 0; + } + + if (getprop("/FMGC/status/phase") >= 1 and getprop("/FMGC/status/phase") <= 2) { + rat.colour = "a"; + } else { + rat.colour = "g"; + } + + if (getprop("/controls/switches/leng") == 1 or getprop("/controls/switches/reng") == 1 or getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) { + eng_aice.active = 1; + } else { + eng_aice.active = 0; + } + + if (getprop("/controls/switches/wing") == 1) { + eng_aice.active = 1; + } else { + eng_aice.active = 0; + } } # Finally the controller diff --git a/Nasal/icing.nas b/Nasal/icing.nas index 8243708d..17af577d 100644 --- a/Nasal/icing.nas +++ b/Nasal/icing.nas @@ -236,6 +236,15 @@ var icingModel = func { setprop("/systems/pitot/failed", 0); } } + + if (getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) { + setprop("/controls/switches/leng", 1); + setprop("/controls/switches/reng", 1); + } + + if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) { + setprop("/controls/switches/wing", 0); + } } ################# diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas index e34dc10c..00c94f02 100644 --- a/Nasal/libraries.nas +++ b/Nasal/libraries.nas @@ -531,13 +531,13 @@ var lightsLoop = maketimer(0.2, func { landl = getprop("/controls/lighting/landing-lights[1]"); landr = getprop("/controls/lighting/landing-lights[2]"); - if (landl == 1) { + if (landl == 1 and getprop("/sim/current-view/internal") == 1) { setprop("/sim/rendering/als-secondary-lights/use-landing-light", 1); } else { setprop("/sim/rendering/als-secondary-lights/use-landing-light", 0); } - if (landr == 1) { + if (landr == 1 and getprop("/sim/current-view/internal") == 1) { setprop("/sim/rendering/als-secondary-lights/use-alt-landing-light", 1); } else { setprop("/sim/rendering/als-secondary-lights/use-alt-landing-light", 0);