ECAM
This commit is contained in:
parent
78dad8e558
commit
0c62d99bec
6 changed files with 110 additions and 11 deletions
|
@ -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();
|
||||
|
|
|
@ -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 @@
|
|||
<g
|
||||
inkscape:label="#g4376"
|
||||
id="ECAM_Right"
|
||||
transform="translate(643.49997)">
|
||||
transform="translate(665.99997)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
|
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
|
@ -42,7 +42,7 @@
|
|||
id="namedview371"
|
||||
showgrid="false"
|
||||
inkscape:zoom="0.43942712"
|
||||
inkscape:cx="171.27247"
|
||||
inkscape:cx="568.82143"
|
||||
inkscape:cy="433.53356"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
|
@ -2114,7 +2114,7 @@
|
|||
<g
|
||||
inkscape:label="#g4376"
|
||||
id="ECAM_Right"
|
||||
transform="translate(641.74462)">
|
||||
transform="translate(665.63937)">
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
|
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
|
@ -93,7 +93,7 @@ var warning = {
|
|||
}
|
||||
|
||||
# if (getprop("/ECAM/msg/line" ~ line) != me.msg)
|
||||
if (getprop("/ECAM/msg/line" ~ line) == "" and me.active == 1) { # at empty line
|
||||
if (getprop("/ECAM/msg/line" ~ line) == "" and me.active == 1 and me.msg != "") { # at empty line. Also checks if message is not blank to allow for some warnings with no displayed msg, eg stall
|
||||
setprop("/ECAM/msg/line" ~ line, me.msg);
|
||||
setprop("/ECAM/msg/linec" ~ line, me.colour);
|
||||
}
|
||||
|
@ -150,13 +150,20 @@ var park_brk_on = warning.new(msg: "PARK BRK ON", active: 0, colour: "a", aural:
|
|||
]);
|
||||
|
||||
var memos = std.Vector.new([
|
||||
var to_inhibit = memo.new(msg: "T.O. INHIBIT", active: 0, colour: "m"),
|
||||
var ldg_inhibit = memo.new(msg: "LDG INHIBIT", active: 0, colour: "m"),
|
||||
var spd_brk = memo.new(msg: "SPEED BRK", active: 0, colour: "g"),
|
||||
var fob_3T = memo.new(msg: "FOB BELOW 3T", active: 0, colour: "g"),
|
||||
var emer_gen = memo.new(msg: "EMER GEN", active: 0, colour: "g"),
|
||||
var rat = memo.new(msg: "RAT OUT", active: 0, colour: "g"),
|
||||
var gnd_splrs = memo.new(msg: "GND SPLRS ARMED", active: 0, colour: "g"),
|
||||
var park_brk = memo.new(msg: "PARK BRK", active: 0, colour: "g"),
|
||||
var refuelg = memo.new(msg: "REFUELG", active: 0, colour: "g"),
|
||||
var ram_air = memo.new(msg: "RAM AIR ON", active: 0, colour: "g")
|
||||
var ram_air = memo.new(msg: "RAM AIR ON", active: 0, colour: "g"),
|
||||
var ptu = memo.new(msg: "HYD PTU", active: 0, colour: "g"),
|
||||
var eng_aice = memo.new(msg: "ENG A.ICE", active: 0, colour: "g"),
|
||||
var wing_aice = memo.new(msg: "WING A.ICE", active: 0, colour: "g"),
|
||||
var fuelx = memo.new(msg: "FUEL X FEED", active: 0, colour: "g")
|
||||
]);
|
||||
|
||||
|
||||
|
@ -182,6 +189,18 @@ var messages_priority_1 = func {}
|
|||
var messages_priority_0 = func {}
|
||||
var messages_memo = func {}
|
||||
var messages_right_memo = func {
|
||||
if (getprop("/FMGC/status/phase") >= 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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
#################
|
||||
|
|
|
@ -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);
|
||||
|
|
Reference in a new issue