1
0
Fork 0

Add ECAM messages about IRS

This commit is contained in:
legoboyvdlp R 2019-12-09 17:38:35 +00:00
parent 0afe84bbce
commit 37fe015d4e
2 changed files with 38 additions and 1 deletions

View file

@ -29,6 +29,10 @@ var phaseVar = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
var gear_agl_cur = nil;
var numberMinutes = nil;
var timeNow = nil;
var timer10secIRS = nil;
var messages_priority_3 = func {
phaseVar = phaseNode.getValue();
@ -1389,6 +1393,39 @@ var messages_memo = func {
refuelg.active = 0;
}
if ((phaseVar == 1 or phaseVar == 2) and toMemoLine1.active != 1 and ldgMemoLine1.active != 1 and (systems.ADIRSnew.ADIRunits[0].inAlign == 1 or systems.ADIRSnew.ADIRunits[1].inAlign == 1 or systems.ADIRSnew.ADIRunits[2].inAlign == 1)) {
irs_in_align.active = 1;
if (getprop("/ECAM/phases/timer/eng1or2-output")) {
irs_in_align.colour = "a";
} else {
irs_in_align.colour = "g";
}
timeNow = pts.Sim.Time.elapsedSec.getValue();
numberMinutes = math.round(math.max(systems.ADIRSnew.ADIRunits[0]._alignTime - timeNow, systems.ADIRSnew.ADIRunits[1]._alignTime - timeNow, systems.ADIRSnew.ADIRunits[2]._alignTime - timeNow) / 60);
if (numberMinutes >= 7) {
irs_in_align.msg = "IRS IN ALIGN > 7 MN";
} elsif (numberMinutes >= 1) {
irs_in_align.msg = "IRS IN ALIGN " ~ numberMinutes ~ " MN";
} else {
irs_in_align.msg = "IRS IN ALIGN";
}
} else {
if (irs_in_align.active and !timer10secIRS) {
timer10secIRS = 1;
irs_in_align.msg = "IRS ALIGNED";
settimer(func() {
irs_in_align.active = 0;
irs_in_align.msg = "IRS IN ALIGN";
timer10secIRS = 0;
}, 10);
} elsif (!timer10secIRS) {
irs_in_align.active = 0;
irs_in_align.msg = "IRS IN ALIGN";
}
}
if (getprop("/controls/flight/speedbrake-arm") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) {
gnd_splrs.active = 1;
} else {

View file

@ -270,7 +270,7 @@ var configmemos = std.Vector.new([
var leftmemos = std.Vector.new([
var company_alert = warning.new(msg: "COMPANY ALERT" ), # Not yet implemented, buzzer sound
var refuelg = warning.new(msg: "REFUELG" ),
var irs_in_align = warning.new(msg: "IRS IN ALIGN" ), # Not yet implemented
var irs_in_align = warning.new(msg: "IRS IN ALIGN" ),
var gnd_splrs = warning.new(msg: "GND SPLRS ARMED" ),
var seatbelts = warning.new(msg: "SEAT BELTS" ),
var nosmoke = warning.new(msg: "NO SMOKING" ),