diff --git a/A320-main.xml b/A320-main.xml
index 713eb889..f74bafc1 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1878,7 +1878,11 @@
+ false
false
+
+ false
+
diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas
index 37112fe8..c99d6675 100644
--- a/AircraftConfig/acconfig.nas
+++ b/AircraftConfig/acconfig.nas
@@ -520,6 +520,7 @@ var taxi_b = func {
libraries.toggleSTD();
}
setprop("/instrumentation/altimeter[0]/setting-inhg", getprop("/environment/metar[0]/pressure-inhg") or 29.92);
+ setprop("/instrumentation/altimeter[6]/setting-inhg", getprop("/environment/metar[0]/pressure-inhg") or 29.92);
settimer(taxi_c, 2);
}
var taxi_c = func {
diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas
index 8f53f93c..bc6f093e 100644
--- a/Models/Instruments/IESI/IESI.nas
+++ b/Models/Instruments/IESI/IESI.nas
@@ -4,7 +4,6 @@
# props.nas nodes
var iesi_init = props.globals.initNode("/instrumentation/iesi/iesi-init", 0, "BOOL");
-var iesi_reset = props.globals.initNode("/instrumentation/iesi/att-reset", 0, "DOUBLE");
var pinPrograms = {
metricAltitude: 1,
@@ -29,6 +28,7 @@ var canvas_IESI = {
};
canvas.parsesvg(obj.group, svg, {"font-mapper": obj.font_mapper} );
+
foreach(var key; obj.getKeys()) {
obj[key] = obj.group.getElementById(key);
@@ -46,37 +46,59 @@ var canvas_IESI = {
obj[key].set("clip-frame", canvas.Element.PARENT);
}
};
+
obj.AI_horizon_trans = obj["AI_horizon"].createTransform();
obj.AI_horizon_rot = obj["AI_horizon"].createTransform();
obj._aiCenter = obj["AI_center"].getCenter();
+
obj._cachedInhg = -999;
+ obj._cachedMetric = pinPrograms.metricAltitude;
obj._cachedMode = nil;
+ obj._cachedShowInhg = pinPrograms.showInHg;
obj._canReset = 0;
obj._excessMotionInInit = 0;
obj._fastInit = 0;
obj._IESITime = 0;
obj._isNegativeAlt = 0;
obj._middleAltOffset = nil;
- obj._powerResult = 0;
- obj._roll = 0;
+ obj.iesiInAlign = 0;
+
+
+ obj["IESI"].hide();
+ obj["IESI_Init"].show();
+ obj["ATTflag"].hide();
obj.update_items = [
- props.UpdateManager.FromHashValue("airspeed", 0.1, func(val) {
+ props.UpdateManager.FromHashValue("airspeedIESI", 0.1, func(val) {
obj["ASI_scale"].setTranslation(0, math.clamp(val - 30, 0, 490) * 8.295);
}),
- props.UpdateManager.FromHashList(["altitude","altitude_ind"], 0.5, func(val) {
- val.altitude = math.clamp(val.altitude, -2000, 50000);
- if (val.altitude < 0) {
+ props.UpdateManager.FromHashValue("altitudeIESI", 0.5, func(val) {
+ val = math.clamp(val, -2000, 50000);
+
+ obj["ALT_meters"].setText(sprintf("%5.0f", math.round(val * 0.3048, 10)));
+
+ obj.middleAltText = roundaboutAlt(val / 100);
+
+ obj["ALT_five"].setText(sprintf("%03d", abs(obj.middleAltText + 10)));
+ obj["ALT_four"].setText(sprintf("%03d", abs(obj.middleAltText + 5)));
+ obj["ALT_three"].setText(sprintf("%03d", abs(obj.middleAltText)));
+ obj["ALT_two"].setText(sprintf("%03d", abs(obj.middleAltText - 5)));
+ obj["ALT_one"].setText(sprintf("%03d", abs(obj.middleAltText - 10)));
+
+ if (val < 0) {
obj["negText"].show();
obj._isNegativeAlt = 1;
} else {
obj["negText"].hide();
obj._isNegativeAlt = 0;
}
+ }),
+ props.UpdateManager.FromHashValue("altitudeIESI", 0.1, func(val) {
+ val = math.clamp(val, -2000, 50000);
+
+ obj.altOffset = (val / 500) - int(val / 500);
- obj.altOffset = (val.altitude / 500) - int(val.altitude / 500);
- obj.middleAltText = roundaboutAlt(val.altitude / 100);
if (obj.altOffset > 0.5) {
obj._middleAltOffset = -(obj.altOffset - 1) * 258.5528;
} else {
@@ -85,23 +107,11 @@ var canvas_IESI = {
obj["ALT_scale"].setTranslation(0, -obj._middleAltOffset);
obj["ALT_scale"].update();
- obj["ALT_five"].setText(sprintf("%03d", abs(obj.middleAltText+10)));
- obj["ALT_four"].setText(sprintf("%03d", abs(obj.middleAltText+5)));
- obj["ALT_three"].setText(sprintf("%03d", abs(obj.middleAltText)));
- obj["ALT_two"].setText(sprintf("%03d", abs(obj.middleAltText-5)));
- obj["ALT_one"].setText(sprintf("%03d", abs(obj.middleAltText-10)));
-
- if (val.altitude < 0 and val.altitude_ind > 20) {
- val.altitude_ind = 20;
- } elsif (val.altitude > 0 and val.altitude_ind > 500) {
- val.altitude_ind = 500;
- }
-
- obj["ALT_digits"].setText(sprintf("%s", val.altitude_ind));
- obj["ALT_meters"].setText(sprintf("%5.0f", math.round(val.altitude * 0.3048, 10)));
- obj.altTens = num(right(sprintf("%02d", val.altitude), 2));
- obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16);
+ obj["ALT_tens"].setTranslation(0, num(right(sprintf("%02d", val), 2)) * 3.16);
+ }),
+ props.UpdateManager.FromHashValue("altitude_indIESI", 0.5, func(val) {
+ obj["ALT_digits"].setText(sprintf("%s", math.clamp(val, -20, 500)));
}),
props.UpdateManager.FromHashValue("showMach", 1, func(val) {
if (val) {
@@ -115,16 +125,15 @@ var canvas_IESI = {
props.UpdateManager.FromHashValue("mach", 0.001, func(val) {
obj["ASI_mach"].setText(sprintf("%2.0f", math.clamp(val * 100, 0, 99)));
}),
- props.UpdateManager.FromHashValue("pitch", 0.025, func(val) {
+ props.UpdateManager.FromHashValue("iesiPitch", 0.025, func(val) {
obj.AI_horizon_trans.setTranslation(0, val * 16.74);
}),
props.UpdateManager.FromHashValue("roll", 0.025, func(val) {
- obj._roll = -val * D2R;
- obj.AI_horizon_rot.setRotation(obj._roll, obj._aiCenter);
- obj["AI_bank"].setRotation(obj._roll);
+ obj.AI_horizon_rot.setRotation(-val * D2R, obj._aiCenter);
+ obj["AI_bank"].setRotation(-val * D2R);
}),
props.UpdateManager.FromHashValue("skid", 0.1, func(val) {
- if (abs(val) >= 84.99) {
+ if (abs(val) >= 85) {
obj["AI_slipskid"].hide();
} else {
obj["AI_slipskid"].setTranslation(-val, 0);
@@ -132,112 +141,174 @@ var canvas_IESI = {
}
}),
];
+
+ obj.update_items_init = [
+ props.UpdateManager.FromHashList(["iesiAlignTime","elapsedTime"], 0.5, func(val) {
+ if (val.iesiAlignTime + 90 >= val.elapsedTime) {
+ obj.iesiInAlign = 1;
+ } else {
+ obj.iesiInAlign = 0;
+ }
+ }),
+ props.UpdateManager.FromHashList(["iesiInAlign","iesiFastInit","irAlignFault"], 1, func(val) {
+ if (val.iesiInAlign) {
+ if (!val.iesiFastInit and val.irAlignFault) {
+ obj._excessMotionInInit = 1;
+ }
+ }
+ }),
+ props.UpdateManager.FromHashList(["iesiExcessMotion","iesiFastInit","iesiInAlign"], 1, func(val) {
+ if (val.iesiInAlign) {
+ if (val.iesiFastInit) {
+ obj["IESI"].show();
+ obj["IESI_Init"].hide();
+ obj["AI_bank"].hide();
+ obj["AI_bank_center"].hide();
+ obj["AI_bank_scale"].hide();
+ obj["AI_horizon"].hide();
+ obj["AI_sky_bank"].hide();
+ obj["ATTflag_text"].setText("ATT 10s");
+ obj["ATTflag_text"].setColor(0,0,0);
+ obj["ATTflag_rect"].setScale(1.5,1);
+ obj["ATTflag_rect"].setTranslation(-250,0);
+ obj["ATTflag_rect"].setColorFill(1,1,0);
+ obj["ATTflag_rect"].setColor(1,1,0);
+ obj["ATTflag"].show();
+ obj["attRst"].hide();
+ obj["attRstRect"].hide();
+ } else {
+ obj["IESI"].hide();
+ obj["IESI_Init"].show();
+ obj["ATTflag"].hide();
+ }
+ } else {
+ if (!val.iesiExcessMotion) {
+ obj["IESI_Init"].hide();
+ obj["IESI"].show();
+ obj["AI_bank"].show();
+ obj["AI_bank_center"].show();
+ obj["AI_bank_scale"].show();
+ obj["AI_index"].show();
+ obj["AI_horizon"].show();
+ obj["AI_sky_bank"].show();
+ obj["ATTflag"].hide();
+ } else {
+ obj["IESI_Init"].hide();
+ obj["IESI"].show();
+ obj["AI_bank"].hide();
+ obj["AI_bank_center"].hide();
+ obj["AI_bank_scale"].hide();
+ obj["AI_horizon"].hide();
+ obj["AI_sky_bank"].hide();
+ obj["ATTflag_text"].setText("ATT");
+ obj["ATTflag_text"].setColor(1,0,0);
+ obj["ATTflag_rect"].setScale(1,1);
+ obj["ATTflag_rect"].setTranslation(0,0);
+ obj["ATTflag_rect"].setColorFill(0,0,0);
+ obj["ATTflag_rect"].setColor(0,0,0);
+ obj["ATTflag"].show();
+ obj["attRst"].show();
+ obj["attRstRect"].show();
+ }
+ }
+ }),
+ ];
+
+ obj.update_items_power = [
+ props.UpdateManager.FromHashList(["iesiPowered","iesiBrt"], 0.005, func(val) {
+ if (val.iesiPowered and val.iesiBrt > 0.01) {
+ obj.group.setVisible(1);
+ pts.Instrumentation.Iesi.lcdOn.setBoolValue(1);
+ } else {
+ obj.group.setVisible(0);
+ pts.Instrumentation.Iesi.lcdOn.setBoolValue(0);
+ }
+ }),
+ props.UpdateManager.FromHashList(["iesiPowered","acconfig","iesiInit"], 1, func(val) {
+ if (val.iesiPowered) {
+ if (val.iesiInit) return;
+ obj.initIESI(val.acconfig);
+ } elsif (val.iesiInit) {
+ obj._canReset = 0;
+ obj._excessMotionInInit = 0;
+ obj._fastInit = 0;
+ iesi_init.setBoolValue(0);
+ }
+ }),
+ ];
return obj;
- },
+ },
getKeys: func() {
return ["IESI","IESI_Init","attRst","attRstRect","att90s","ATTflag","ATTflag_rect","ATTflag_text","ALTwarn","SPDwarn","ASI_scale","ASI_mach","ASI_mach_decimal","AI_center","AI_index","AI_horizon","AI_sky_bank","AI_bank","AI_bank_center","AI_slipskid","ALT_scale","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_meters","QNH_setting","QNH_std","negText","negText2","AI_bank_scale","metricM","metricBox"];
},
- alignFault: props.globals.getNode("/systems/navigation/align-fault"),
update: func(notification) {
- me._powerResult = me.updatePower(notification);
- if (me._powerResult == 0) { return; }
+ me.updatePower(notification);
- if (math.abs(notification.qnh_inhg - me._cachedInhg) > 0.005 or notification.altimeter_mode != me._cachedMode) {
- me._cachedInhg = notification.qnh_inhg;
- me._cachedMode = notification.altimeter_mode;
+ foreach(var update_item; me.update_items_power)
+ {
+ update_item.update(notification);
+ }
+
+ if (!me.group.getVisible()) { return; }
+
+ notification.iesiAlignTime = me._IESITime;
+ notification.iesiExcessMotion = me._excessMotionInInit;
+ notification.iesiFastInit = me._fastInit;
+ notification.iesiInAlign = me.iesiInAlign;
+
+ foreach(var update_item; me.update_items_init)
+ {
+ update_item.update(notification);
+ }
+
+ if (math.abs(notification.qnh_inhg_iesi - me._cachedInhg) > 0.005 or notification.altimeter_mode_iesi != me._cachedMode or pinPrograms.showInHg != me._cachedShowInhg) {
+ me._cachedInhg = notification.qnh_inhg_iesi;
+ me._cachedMode = notification.altimeter_mode_iesi;
+ me._cachedShowInhg = pinPrograms.showInHg;
me.updateQNH(notification);
}
- if (me._IESITime + 90 >= notification.elapsedTime) {
- if (!me._fastInit and me.alignFault.getBoolValue()) {
- me._excessMotionInInit = 1;
- }
-
- if (me._fastInit) {
- me["IESI"].show();
- me["IESI_Init"].hide();
- me["AI_bank"].hide();
- me["AI_bank_center"].hide();
- me["AI_bank_scale"].hide();
- me["AI_horizon"].hide();
- me["AI_sky_bank"].hide();
- me["ATTflag_text"].setText("ATT 10s");
- me["ATTflag_text"].setColor(0,0,0);
- me["ATTflag_rect"].setScale(1.5,1);
- me["ATTflag_rect"].setTranslation(-250,0);
- me["ATTflag_rect"].setColorFill(1,1,0);
- me["ATTflag_rect"].setColor(1,1,0);
- me["ATTflag"].show();
- me["attRst"].hide();
- me["attRstRect"].hide();
- } else {
- me["IESI"].hide();
- me["IESI_Init"].show();
- me["ATTflag"].hide();
- return;
- }
- } else {
- if (pinPrograms.metricAltitude) {
- me["ALT_meters"].show();
- me["metricM"].show();
- me["metricBox"].show();
-
- if (me._isNegativeAlt) {
- me["negText2"].show();
- } else {
- me["negText2"].hide();
- }
- } else {
- me["ALT_meters"].hide();
- me["metricM"].hide();
- me["metricBox"].hide();
- me["negText2"].hide();
- }
-
- if (!me._excessMotionInInit) {
- me["IESI_Init"].hide();
- me["IESI"].show();
- me["AI_bank"].show();
- me["AI_bank_center"].show();
- me["AI_bank_scale"].show();
- me["AI_index"].show();
- me["AI_horizon"].show();
- me["AI_sky_bank"].show();
- me["ATTflag"].hide();
- } else {
- me["IESI_Init"].hide();
- me["IESI"].show();
- me["AI_bank"].hide();
- me["AI_bank_center"].hide();
- me["AI_bank_scale"].hide();
- me["AI_horizon"].hide();
- me["AI_sky_bank"].hide();
- me["ATTflag_text"].setText("ATT");
- me["ATTflag_text"].setColor(1,0,0);
- me["ATTflag_rect"].setScale(1,1);
- me["ATTflag_rect"].setTranslation(0,0);
- me["ATTflag_rect"].setColorFill(0,0,0);
- me["ATTflag_rect"].setColor(0,0,0);
- me["ATTflag"].show();
- me["attRst"].show();
- me["attRstRect"].show();
- }
- }
+ if (me.iesiInAlign and !me._fastInit) return;
foreach(var update_item; me.update_items)
{
update_item.update(notification);
}
+
+ if (!me.iesiInAlign and pinPrograms.metricAltitude != me._cachedMetric) {
+ me._cachedMetric = pinPrograms.metricAltitude;
+ me.updateMetric(pinPrograms.metricAltitude);
+ }
+
+ if (pinPrograms.metricAltitude) {
+ if (me._isNegativeAlt) {
+ me["negText2"].show();
+ } else {
+ me["negText2"].hide();
+ }
+ }
+ },
+ updateMetric: func(val) {
+ if (val) {
+ me["ALT_meters"].show();
+ me["metricM"].show();
+ me["metricBox"].show();
+ } else {
+ me["ALT_meters"].hide();
+ me["metricM"].hide();
+ me["metricBox"].hide();
+ me["negText2"].hide();
+ }
},
updateQNH: func(notification) {
- if (notification.altimeter_mode) {
+ if (notification.altimeter_mode_iesi) {
me["QNH_setting"].hide();
me["QNH_std"].show();
} else {
if (pinPrograms.showInHg) {
- me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg));
+ me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa_iesi) ~ "/" ~ sprintf("%2.2f", notification.qnh_inhg_iesi));
} else {
- me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa));
+ me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa_iesi));
}
me["QNH_std"].hide();
me["QNH_setting"].show();
@@ -252,30 +323,13 @@ var canvas_IESI = {
} else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me._canReset) {
me._canReset = 1;
}
-
- if (notification.iesiPowered) {
- if (notification.acconfig != 1 and notification.iesiInit != 1) {
- iesi_init.setBoolValue(1);
- me._IESITime = notification.elapsedTime - (me._fastInit ? 80 : 0);
- } else if (notification.acconfig == 1 and notification.iesiInit != 1) {
- iesi_init.setBoolValue(1);
- me._IESITime = notification.elapsedTime - 87;
- }
- } elsif (notification.iesiInit) {
- me._canReset = 0;
- me._excessMotionInInit = 0;
- me._fastInit = 0;
- iesi_init.setBoolValue(0);
- }
-
- if (notification.iesiPowered and notification.iesiBrt > 0.01) {
- me.group.setVisible(1);
- pts.Instrumentation.Iesi.lcdOn.setBoolValue(1);
- return 1;
+ },
+ initIESI: func(acconfig) {
+ iesi_init.setBoolValue(1);
+ if (!acconfig) {
+ me._IESITime = pts.Sim.Time.elapsedSec.getValue() - (me._fastInit ? 80 : 0);
} else {
- me.group.setVisible(0);
- pts.Instrumentation.Iesi.lcdOn.setBoolValue(0);
- return 0;
+ me._IESITime = pts.Sim.Time.elapsedSec.getValue() - 87;
}
},
};
@@ -308,40 +362,41 @@ var IESIRecipient =
var A320IESI = IESIRecipient.new("A320 IESI");
emesary.GlobalTransmitter.Register(A320IESI);
+# Emesary Frame Notifiaction Properties
var input = {
"acconfig": "/systems/acconfig/autoconfig-running",
- "airspeed": "/instrumentation/airspeed-indicator[0]/indicated-speed-kt",
- "altitude": "/instrumentation/altimeter[6]/indicated-altitude-ft",
- "altitude_ind": "/instrumentation/altimeter[6]/indicated-altitude-ft-pfd",
- "altimeter_mode": "/instrumentation/altimeter[6]/std",
+ "airspeedIESI": "/instrumentation/airspeed-indicator[0]/indicated-speed-kt",
+ "altitudeIESI": "/instrumentation/altimeter[6]/indicated-altitude-ft",
+ "altitude_indIESI": "/instrumentation/altimeter[6]/indicated-altitude-ft-pfd",
+ "altimeter_mode_iesi": "/instrumentation/altimeter[6]/std",
"attReset": "/instrumentation/iesi/att-reset",
"iesiBrt": "/controls/lighting/DU/iesi",
"iesiInit": "/instrumentation/iesi/iesi-init",
+ "iesiPitch": "/instrumentation/iesi/pitch-deg",
"iesiPowered": "/instrumentation/iesi/power/power-on",
+ "irAlignFault": "/systems/navigation/align-fault",
"mach": "/instrumentation/airspeed-indicator/indicated-mach",
- "pitch": "/instrumentation/iesi/pitch-deg",
- "qnh_hpa": "/instrumentation/altimeter[6]/setting-hpa",
- "qnh_inhg": "/instrumentation/altimeter[6]/setting-inhg",
+ "qnh_hpa_iesi": "/instrumentation/altimeter[6]/setting-hpa",
+ "qnh_inhg_iesi": "/instrumentation/altimeter[6]/setting-inhg",
"roll": "/orientation/roll-deg",
- "skid": "/instrumentation/iesi/slip-skid",
"showMach": "/instrumentation/iesi/display/show-mach",
+ "skid": "/instrumentation/iesi/slip-skid",
};
foreach (var name; keys(input)) {
emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 IESI", name, input[name]));
}
+# Helper functions
var showIESI = func {
var dlg = canvas.Window.new([512, 512], "dialog").set("resize", 1);
dlg.setCanvas(A320IESI.MainScreen.canvas);
}
var roundabout = func(x) {
- var y = x - int(x);
- return y < 0.5 ? int(x) : 1 + int(x);
+ return (x - int(x)) < 0.5 ? int(x) : 1 + int(x);
};
var roundaboutAlt = func(x) {
- var y = x * 0.2 - int(x * 0.2);
- return y < 0.5 ? 5 * int(x * 0.2) : 5 + 5 * int(x * 0.2);
+ return (x * 0.2 - int(x * 0.2)) < 0.5 ? 5 * int(x * 0.2) : 5 + 5 * int(x * 0.2);
};
\ No newline at end of file
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
index aa1d681d..1466b276 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-APU.nas
@@ -195,6 +195,25 @@ var canvas_lowerECAMPageApu =
}),
];
+ obj.updateItemsPower = [
+ props.UpdateManager.FromHashList(["du3Power","du4Power","du3InTest","du4InTest","ecamDuXfr","pageMatch"], 1, func(val) {
+ if (val.pageMatch) {
+ if (val.du4Power) {
+ obj.group.setVisible(val.du4InTest ? 0 : 1);
+ obj.test.setVisible(val.du4InTest ? 1 : 0);
+ } else if (val.ecamDuXfr and val.du3Power) {
+ obj.group.setVisible(val.du3InTest ? 0 : 1);
+ obj.test.setVisible(val.du3InTest ? 1 : 0);
+ } else {
+ obj.group.setVisible(0);
+ obj.test.setVisible(0);
+ }
+ } else {
+ obj.group.setVisible(0);
+ }
+ }),
+ ];
+
obj.updateItemsBottom = [
props.UpdateManager.FromHashValue("acconfigUnits", nil, func(val) {
obj.units = val;
@@ -270,7 +289,7 @@ var canvas_lowerECAMPageApu =
}
},
update: func(notification) {
- me.updatePower();
+ me.updatePower(notification);
if (me.test.getVisible() == 1) {
me.updateTest(notification);
@@ -313,38 +332,16 @@ var canvas_lowerECAMPageApu =
me.updateBottom(notification);
},
- updatePower: func() {
+ updatePower: func(notification) {
if (me.name == ecam.SystemDisplayController.displayedPage.name) {
- if (du4_lgt.getValue() > 0.01 and systems.ELEC.Bus.ac2.getValue() >= 110) {
- if (du4_test_time.getValue() + du4_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
- me.group.setVisible(0);
- me.test.setVisible(1);
- } else {
- me.group.setVisible(1);
- me.test.setVisible(0);
- }
- } else {
- if (pts.Modes.EcamDuXfr.getBoolValue()) {
- if (du3_lgt.getValue() > 0.01 and systems.ELEC.Bus.acEss.getValue() >= 110) {
- if (du3_test_time.getValue() + du3_test_amount.getValue() >= pts.Sim.Time.elapsedSec.getValue()) {
- me.group.setVisible(0);
- me.test.setVisible(1);
- } else {
- me.group.setVisible(1);
- me.test.setVisible(0);
- }
- } else {
- me.group.setVisible(0);
- me.test.setVisible(0);
- }
- } else {
- me.group.setVisible(0);
- me.test.setVisible(0);
- }
- }
+ notification.pageMatch = 1;
} else {
- me.group.setVisible(0);
- # don't hide the test group; just let whichever page is active control it
+ notification.pageMatch = 0;
+ }
+
+ foreach(var update_item; me.updateItemsPower)
+ {
+ update_item.update(notification);
}
},
};
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-base.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-base.nas
index e2ea4682..7027417d 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-base.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-base.nas
@@ -73,8 +73,7 @@ var canvas_lowerECAM_base =
}
},
# Due to weirdness of the parents hash / me reference
- # you need to access it using me.Test_white rather than
- # me["Test_white"]
+ # you need to access it using me.Test_white
updateTest: func(notification) {
if (du4_test_time.getValue() + 1 >= notification.elapsedTime) {
me.Test_white.show();
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
index 32842bfc..0d102479 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-fctl.nas
@@ -138,7 +138,7 @@ var canvas_lowerECAMPageFctl =
}
}),
props.UpdateManager.FromHashValue("fctlElevTrim", 0.01, func(val) {
- obj["PT"].setText(sprintf("%2.1f", val));
+ obj["PT"].setText(sprintf("%4.1f", val));
if (val >= 0.09) {
obj["PTupdn"].setText("UP");
obj["PTupdn"].show();
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index b6b246ef..06af5e11 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -61,6 +61,11 @@ var input = {
gForceDisplay: "/ECAM/Lower/g-force-display",
hour: "/sim/time/utc/hour",
minute: "/sim/time/utc/minute",
+ du3Power: "/instrumentation/displays/du3/power-on",
+ du4Power: "/instrumentation/displays/du4/power-on",
+ du3InTest: "/instrumentation/displays/du3/test-active",
+ du4InTest: "/instrumentation/displays/du4/test-active",
+ ecamDuXfr: "/modes/ecam-du-xfr",
};
foreach (var name; keys(input)) {
diff --git a/Models/Instruments/Lower-ECAM/res/fctl.svg b/Models/Instruments/Lower-ECAM/res/fctl.svg
index f038ae46..d871b070 100644
--- a/Models/Instruments/Lower-ECAM/res/fctl.svg
+++ b/Models/Instruments/Lower-ECAM/res/fctl.svg
@@ -1,19 +1,19 @@