1
0
Fork 0

PDF: fix ground_ref showing / hiding; ECAM - improve DIRECT / ALTN law messages

This commit is contained in:
Jonathan Redpath 2021-10-22 18:22:58 +01:00
parent f3b7672039
commit c17a4e22c2
4 changed files with 24 additions and 11 deletions

View file

@ -238,13 +238,7 @@ var canvas_pfd = {
} else { } else {
obj["AI_agl"].setText(sprintf("%s", math.round(math.clamp(val, 0, 2500)))); obj["AI_agl"].setText(sprintf("%s", math.round(math.clamp(val, 0, 2500))));
} }
obj["ground_ref"].setTranslation(0, (-val / 100) * -48.66856);
if (-val >= -565 and -val <= 565) {
obj["ground_ref"].setTranslation(0, (-val / 100) * -48.66856);
obj["ground_ref"].show();
} else {
obj["ground_ref"].hide();
}
}), }),
props.UpdateManager.FromHashList(["agl","gear1Wow", "gear2Wow","fmgcPhase"], nil, func(val) { props.UpdateManager.FromHashList(["agl","gear1Wow", "gear2Wow","fmgcPhase"], nil, func(val) {
if (-val.agl >= -565 and -val.agl <= 565) { if (-val.agl >= -565 and -val.agl <= 565) {
@ -1310,6 +1304,13 @@ var canvas_pfd = {
me["ASI_trend_up"].hide(); me["ASI_trend_up"].hide();
me["ASI_trend_down"].hide(); me["ASI_trend_down"].hide();
} }
if (-notification.agl >= -565 and -notification.agl <= 565) {
me["ground_ref"].show();
} else {
me["ground_ref"].hide();
}
} else { } else {
me["ASI_group"].hide(); me["ASI_group"].hide();
me["ASI_error"].show(); me["ASI_error"].show();

View file

@ -37,6 +37,7 @@ var alt200 = nil;
var alt750 = nil; var alt750 = nil;
var bigThree = nil; var bigThree = nil;
var fltCtlLandAsap = 0; var fltCtlLandAsap = 0;
var gearPosition = nil;
var altAlertSteady = 0; var altAlertSteady = 0;
var altAlertFlash = 0; var altAlertFlash = 0;
@ -2057,10 +2058,11 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fctlSpdBrkStillOut); ECAM_controller.warningReset(fctlSpdBrkStillOut);
} }
gearPosition = pts.Gear.position[1].getValue();
if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) {
directLaw.active = 1; directLaw.active = 1;
directLawProt.active = 1; directLawProt.active = 1;
if (directLawMaxSpeed.clearFlag == 0 and !fbw.tripleADRFail and pts.Gear.position[1].getValue() == 1) { if (directLawMaxSpeed.clearFlag == 0 and !fbw.tripleADRFail and gearPosition != 1) {
directLawMaxSpeed.active = 1; directLawMaxSpeed.active = 1;
} else { } else {
ECAM_controller.warningReset(directLawMaxSpeed); ECAM_controller.warningReset(directLawMaxSpeed);
@ -2070,12 +2072,12 @@ var messages_priority_2 = func {
} else { } else {
ECAM_controller.warningReset(directLawTrim); ECAM_controller.warningReset(directLawTrim);
} }
if (directLawCare.clearFlag == 0 and (fbw.tripleADRFail or pts.Gear.position[1].getValue() == 1)) { if (directLawCare.clearFlag == 0 and (fbw.tripleADRFail or gearPosition != 1)) {
directLawCare.active = 1; directLawCare.active = 1;
} else { } else {
ECAM_controller.warningReset(directLawCare); ECAM_controller.warningReset(directLawCare);
} }
if (directLawSpdBrk.clearFlag == 0 and !fbw.tripleADRFail and pts.Gear.position[1].getValue() == 1) { if (directLawSpdBrk.clearFlag == 0 and !fbw.tripleADRFail and gearPosition != 1) {
directLawSpdBrk.active = 1; directLawSpdBrk.active = 1;
} else { } else {
ECAM_controller.warningReset(directLawSpdBrk); ECAM_controller.warningReset(directLawSpdBrk);
@ -2111,7 +2113,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(altnLawMaxSpeed2); ECAM_controller.warningReset(altnLawMaxSpeed2);
} }
if (altnLawMaxSpdBrk.clearFlag == 0 and (fbw.tripleADRFail or warningNodes.Logic.leftElevFail.getValue() or warningNodes.Logic.rightElevFail.getValue())) { if (altnLawCare.clearFlag == 0 and (fbw.tripleADRFail or gearPosition != 1)) {
altnLawCare.active = 1;
} else {
ECAM_controller.warningReset(altnLawCare);
}
if (altnLawMaxSpdBrk.clearFlag == 0 and (fbw.tripleADRFail or warningNodes.Logic.leftElevFail.getValue() or warningNodes.Logic.rightElevFail.getValue() or warningNodes.Logic.leftElevNotAvail.getValue())) {
altnLawMaxSpdBrk.active = 1; altnLawMaxSpdBrk.active = 1;
} else { } else {
ECAM_controller.warningReset(altnLawMaxSpdBrk); ECAM_controller.warningReset(altnLawMaxSpdBrk);
@ -2121,6 +2129,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(altnLawProt); ECAM_controller.warningReset(altnLawProt);
ECAM_controller.warningReset(altnLawMaxSpeed); ECAM_controller.warningReset(altnLawMaxSpeed);
ECAM_controller.warningReset(altnLawMaxSpeed2); ECAM_controller.warningReset(altnLawMaxSpeed2);
ECAM_controller.warningReset(altnLawCare);
ECAM_controller.warningReset(altnLawMaxSpdBrk); ECAM_controller.warningReset(altnLawMaxSpdBrk);
} }

View file

@ -501,6 +501,7 @@ var warnings = std.Vector.new([
var altnLawProt = warning.new(msg: " (PROT LOST)", colour: "a"), var altnLawProt = warning.new(msg: " (PROT LOST)", colour: "a"),
var altnLawMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"), var altnLawMaxSpeed = warning.new(msg: " MAX SPEED........320 KT", colour: "c"),
var altnLawMaxSpeed2 = warning.new(msg: " MAX SPEED........320/.77", colour: "c"), var altnLawMaxSpeed2 = warning.new(msg: " MAX SPEED........320/.77", colour: "c"),
var altnLawCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"),
var altnLawMaxSpdBrk = warning.new(msg: " SPD BRK.......DO NOT USE", colour: "c"), var altnLawMaxSpdBrk = warning.new(msg: " SPD BRK.......DO NOT USE", colour: "c"),
# Autothrust # Autothrust

View file

@ -117,7 +117,9 @@ var warningNodes = {
greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"), greenYellow: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-failure"),
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"), greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"), leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
leftElevNotAvail: props.globals.initNode("ECAM/warnings/fctl/leftElevFault-cond"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
rightElevNotAvail: props.globals.initNode("ECAM/warnings/fctl/rightElevFault-cond"),
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"), flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"), slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"),
flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"), flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"),