Rework dual failure, add new font
This commit is contained in:
parent
2a73b57ac5
commit
f9afa68519
4 changed files with 109 additions and 52 deletions
BIN
Fonts/LiberationMonoCustom.ttf
Normal file
BIN
Fonts/LiberationMonoCustom.ttf
Normal file
Binary file not shown.
|
@ -107,6 +107,25 @@ var canvas_upperECAM_base = {
|
|||
me[key] = canvas_group.getElementById(key);
|
||||
}
|
||||
|
||||
# set font
|
||||
me["ECAML1"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML2"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML3"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML4"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML5"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML6"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML7"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAML8"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR1"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR2"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR3"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR4"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR5"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR6"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR7"].setFont("LiberationMonoCustom.ttf");
|
||||
me["ECAMR8"].setFont("LiberationMonoCustom.ttf");
|
||||
|
||||
|
||||
me.page = canvas_group;
|
||||
|
||||
return me;
|
||||
|
|
|
@ -15,7 +15,14 @@ var fac1Node = props.globals.getNode("/controls/fctl/fac1", 1);
|
|||
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
|
||||
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
|
||||
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
|
||||
|
||||
var apu_rpm = props.globals.getNode("/systems/apu/rpm", 1);
|
||||
var wing_pb = props.globals.getNode("/controls/switches/wing", 1);
|
||||
var apumaster = props.globals.getNode("/controls/APU/master", 1);
|
||||
var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu", 1);
|
||||
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
|
||||
var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
|
||||
var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
|
||||
var engOpt = props.globals.getNode("/options/eng", 1);
|
||||
# local variables
|
||||
var phaseVar = nil;
|
||||
var dualFailFACActive = 1;
|
||||
|
@ -44,116 +51,145 @@ var messages_priority_3 = func {
|
|||
if (getprop("/controls/engines/engine-start-switch") != 2 and dualFailModeSel.clearFlag == 0) {
|
||||
dualFailModeSel.active = 1;
|
||||
} else {
|
||||
dualFailModeSel.active = 0;
|
||||
ECAM_controller.warningReset(dualFailModeSel);
|
||||
}
|
||||
|
||||
if (getprop("/fdm/jsbsim/fcs/throttle-lever[0]") > 0.01 and getprop("/fdm/jsbsim/fcs/throttle-lever[1]") > 0.01 and dualFailLevers.clearFlag == 0) {
|
||||
dualFailLevers.active = 1;
|
||||
} else {
|
||||
dualFailLevers.active = 0;
|
||||
ECAM_controller.warningReset(dualFailLevers);
|
||||
}
|
||||
|
||||
if (getprop("/options/eng") == "IAE" and dualFailRelightSPD.clearFlag == 0) {
|
||||
if (engOpt.getValue() == "IAE" and dualFailRelightSPD.clearFlag == 0) {
|
||||
dualFailRelightSPD.active = 1;
|
||||
} else {
|
||||
dualFailRelightSPD.active = 0;
|
||||
ECAM_controller.warningReset(dualFailRelightSPD);
|
||||
}
|
||||
|
||||
if (getprop("/options/eng") != "IAE" and dualFailRelightSPDCFM.clearFlag == 0) {
|
||||
if (engOpt.getValue() != "IAE" and dualFailRelightSPDCFM.clearFlag == 0) {
|
||||
dualFailRelightSPDCFM.active = 1;
|
||||
} else {
|
||||
dualFailRelightSPDCFM.active = 0;
|
||||
ECAM_controller.warningReset(dualFailRelightSPDCFM);
|
||||
}
|
||||
|
||||
if (emerGen.getValue() == 0 and dualFailElec.clearFlag == 0) {
|
||||
dualFailElec.active = 1;
|
||||
} else {
|
||||
dualFailElec.active = 0;
|
||||
ECAM_controller.warningReset(dualFailElec);
|
||||
}
|
||||
|
||||
if (dualFailRadio.clearFlag == 0) {
|
||||
dualFailRadio.active = 1;
|
||||
} else {
|
||||
dualFailRadio.active = 0;
|
||||
ECAM_controller.warningReset(dualFailRadio);
|
||||
}
|
||||
|
||||
if (dualFailFACActive == 1 and dualFailFAC.clearFlag == 0) {
|
||||
dualFailFAC.active = 1;
|
||||
} else {
|
||||
dualFailFAC.active = 0;
|
||||
ECAM_controller.warningReset(dualFailFAC);
|
||||
}
|
||||
|
||||
if (dualFailAPU.clearFlag == 0) { # assumption - not cleared till you clear APU message
|
||||
dualFailRelight.active = 1;
|
||||
|
||||
if (dualFailMasters.clearFlag == 0) {
|
||||
dualFailRelight.active = 1; # assumption
|
||||
dualFailMasters.active = 1;
|
||||
dualFailSuccess.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailRelight);
|
||||
ECAM_controller.warningReset(dualFailMasters);
|
||||
}
|
||||
|
||||
if (dualFailSPDGD.clearFlag == 0) {
|
||||
dualFailSuccess.active = 1; # assumption
|
||||
dualFailSPDGD.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailSuccess);
|
||||
ECAM_controller.warningReset(dualFailSPDGD);
|
||||
}
|
||||
|
||||
if (dualFailAPU.clearFlag == 0) {
|
||||
dualFailAPU.active = 1;
|
||||
} else {
|
||||
dualFailRelight.active = 1;
|
||||
dualFailMasters.active = 1;
|
||||
dualFailSuccess.active = 1;
|
||||
dualFailAPU.active = 1;
|
||||
ECAM_controller.warningReset(dualFailAPU);
|
||||
}
|
||||
|
||||
if (dualFailAPUwing.clearFlag == 0 and apu_rpm.getValue() > 94.9 and wing_pb.getBoolValue()) {
|
||||
dualFailAPUwing.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailAPUwing);
|
||||
}
|
||||
|
||||
if (dualFailAPUbleed.clearFlag == 0 and apu_rpm.getValue() > 94.9 and !apu_bleedSw.getBoolValue()) {
|
||||
dualFailAPUbleed.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailAPUbleed);
|
||||
}
|
||||
|
||||
if (dualFailMastersAPU.clearFlag == 0) {
|
||||
dualFailMastersAPU.active = 1;
|
||||
} else {
|
||||
dualFailMastersAPU.active = 0;
|
||||
}
|
||||
|
||||
if (dualFailSPDGD.clearFlag == 0) {
|
||||
dualFailSPDGD.active = 1;
|
||||
} else {
|
||||
dualFailSPDGD.active = 0;
|
||||
ECAM_controller.warningReset(dualFailMastersAPU);
|
||||
}
|
||||
|
||||
if (dualFailflap.clearFlag == 0) {
|
||||
dualFailAPPR.active = 1;
|
||||
dualFailAPPR.active = 1; # assumption
|
||||
dualFailflap.active = 1;
|
||||
} else {
|
||||
dualFailAPPR.active = 0;
|
||||
ECAM_controller.warningReset(dualFailAPPR);
|
||||
ECAM_controller.warningReset(dualFailflap);
|
||||
}
|
||||
|
||||
if (dualFailcabin.clearFlag == 0) {
|
||||
dualFailcabin.active = 1;
|
||||
} else {
|
||||
dualFailcabin.active = 0;
|
||||
ECAM_controller.warningReset(dualFailcabin);
|
||||
}
|
||||
|
||||
if (dualFailrudd.clearFlag == 0) {
|
||||
dualFailrudd.active = 1;
|
||||
} else {
|
||||
dualFailrudd.active = 0;
|
||||
ECAM_controller.warningReset(dualFailrudd);
|
||||
}
|
||||
|
||||
if (dualFailflap.clearFlag == 0) {
|
||||
dualFailflap.active = 1;
|
||||
} else {
|
||||
dualFailflap.active = 0;
|
||||
}
|
||||
|
||||
if (dualFailfinalspeed.clearFlag == 0) {
|
||||
dualFail5000.active = 1;
|
||||
} else {
|
||||
dualFail5000.active = 0;
|
||||
}
|
||||
|
||||
if (dualFailgear.clearFlag == 0) {
|
||||
if (dualFailgear.clearFlag == 0 and gear.getValue() != 1) {
|
||||
dualFail5000.active = 1; # according to doc
|
||||
dualFailgear.active = 1;
|
||||
} else {
|
||||
dualFailgear.active = 0;
|
||||
ECAM_controller.warningReset(dualFailgear);
|
||||
ECAM_controller.warningReset(dualFail5000);
|
||||
}
|
||||
|
||||
if (dualFailfinalspeed.clearFlag == 0) {
|
||||
dualFailfinalspeed.active = 1;
|
||||
} else {
|
||||
dualFailfinalspeed.active = 0;
|
||||
ECAM_controller.warningReset(dualFailfinalspeed);
|
||||
}
|
||||
|
||||
dualFailtouch.active = 1;
|
||||
dualFailmasteroff.active = 1;
|
||||
dualFailapuoff.active = 1;
|
||||
dualFailevac.active = 1;
|
||||
dualFailbatt.active = 1;
|
||||
if (dualFailmasteroff.clearFlag == 0 and (!cutoff1.getBoolValue() or !cutoff2.getBoolValue())) {
|
||||
dualFailmasteroff.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailmasteroff);
|
||||
}
|
||||
|
||||
if (dualFailapuoff.clearFlag == 0 and apumaster.getBoolValue()) {
|
||||
dualFailapuoff.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailapuoff);
|
||||
}
|
||||
|
||||
if (dualFailevac.clearFlag == 0) {
|
||||
dualFailevac.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailevac);
|
||||
}
|
||||
|
||||
if (dualFailbatt.clearFlag == 0) { # elec power lost when batt goes off anyway I guess
|
||||
dualFailbatt.active = 1;
|
||||
dualFailtouch.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailbatt);
|
||||
ECAM_controller.warningReset(dualFailtouch);
|
||||
}
|
||||
}
|
||||
|
||||
# CONFIG
|
||||
|
|
|
@ -22,19 +22,21 @@ var warnings = std.Vector.new([
|
|||
var dualFailRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"),
|
||||
var dualFailFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
|
||||
var dualFailRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w", hasSubmsg: 1),
|
||||
var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c", hasSubmsg: 1),
|
||||
var dualFailMasters = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
|
||||
var dualFailSuccess = warning.new(msg: " •IF UNSUCCESSFUL : ", colour: "w", hasSubmsg: 1),
|
||||
var dualFailAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"),
|
||||
var dualFailAPUwing = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"),
|
||||
var dualFailAPUbleed = warning.new(msg: " -APU BLEED...........ON", colour: "c"),
|
||||
var dualFailMastersAPU = warning.new(msg: " -ENG MASTERS.OFF 30S/ON", colour: "c"),
|
||||
var dualFailSPDGD = warning.new(msg: " OPTIMUM SPEED.....G DOT", colour: "c"),
|
||||
var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w"),
|
||||
var dualFailAPPR = warning.new(msg: " •EARLY IN APPR : ", colour: "w", hasSubmsg: 1),
|
||||
var dualFailcabin = warning.new(msg: " -CAB SECURE.......ORDER", colour: "c"),
|
||||
var dualFailrudd = warning.new(msg: " -USE RUDDER WITH CARE ", colour: "c"),
|
||||
var dualFailflap = warning.new(msg: " -FOR LDG.....USE FLAP 3", colour: "c"),
|
||||
var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w"),
|
||||
var dualFail5000 = warning.new(msg: " •AT 5000 FT AGL : ", colour: "w", hasSubmsg: 1),
|
||||
var dualFailgear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"),
|
||||
var dualFailfinalspeed = warning.new(msg: " TARGET SPEED.....150 KT", colour: "c"),
|
||||
var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w"),
|
||||
var dualFailtouch = warning.new(msg: " •AT TOUCH DOWN : ", colour: "w", hasSubmsg: 1),
|
||||
var dualFailmasteroff = warning.new(msg: " -ENG MASTERS........OFF", colour: "c"),
|
||||
var dualFailapuoff = warning.new(msg: " -APU MASTER SW......OFF", colour: "c"),
|
||||
var dualFailevac = warning.new(msg: " -EVAC..........INITIATE", colour: "c"),
|
||||
|
|
Reference in a new issue