Fix confusion between IESI and PFD nodes
This commit is contained in:
parent
cf9a657195
commit
c845cda5af
2 changed files with 25 additions and 21 deletions
|
@ -70,12 +70,22 @@ var canvas_IESI = {
|
|||
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.FromHashValue("altitude", 0.5, func(val) {
|
||||
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;
|
||||
|
@ -83,9 +93,11 @@ var canvas_IESI = {
|
|||
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.middleAltText = roundaboutAlt(val / 100);
|
||||
|
||||
if (obj.altOffset > 0.5) {
|
||||
obj._middleAltOffset = -(obj.altOffset - 1) * 258.5528;
|
||||
|
@ -96,17 +108,9 @@ 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)));
|
||||
|
||||
obj["ALT_meters"].setText(sprintf("%5.0f", math.round(val * 0.3048, 10)));
|
||||
|
||||
obj["ALT_tens"].setTranslation(0, num(right(sprintf("%02d", val), 2)) * 3.16);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("altitude_ind", 0.5, func(val) {
|
||||
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) {
|
||||
|
@ -359,9 +363,9 @@ 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",
|
||||
"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",
|
||||
|
|
|
@ -1221,7 +1221,7 @@ var canvas_pfd = {
|
|||
obj["Metric_cur_alt"].hide();
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("altitude", 0.5, func(val) {
|
||||
props.UpdateManager.FromHashValue("altitudePFD", 0.5, func(val) {
|
||||
obj["Metric_cur_alt"].setText(sprintf("%5.0f", val * 0.3048));
|
||||
|
||||
obj.middleAltText = roundaboutAlt(val / 100);
|
||||
|
@ -1238,7 +1238,7 @@ var canvas_pfd = {
|
|||
obj["ALT_neg"].hide();
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("altitude", 0.1, func(val) {
|
||||
props.UpdateManager.FromHashValue("altitudePFD", 0.1, func(val) {
|
||||
obj.altOffset = val / 500 - int(val / 500);
|
||||
obj.middleAltOffset = nil;
|
||||
|
||||
|
@ -1685,7 +1685,7 @@ var canvas_pfd = {
|
|||
|
||||
if (dmc.DMController.DMCs[me.number].outputs[1] != nil) {
|
||||
notification.altError = 0;
|
||||
notification.altitude = dmc.DMController.DMCs[me.number].outputs[1].getValue();
|
||||
notification.altitudePFD = dmc.DMController.DMCs[me.number].outputs[1].getValue();
|
||||
notification.altitudeDigits = dmc.DMController.DMCs[me.number].outputs[3].getValue();
|
||||
notification.altitudeDifference = dmc.DMController.DMCs[me.number].outputs[7].getValue();
|
||||
|
||||
|
@ -1769,7 +1769,7 @@ var canvas_pfd = {
|
|||
}
|
||||
} else {
|
||||
notification.altError = 1;
|
||||
notification.altitude = -9999;
|
||||
notification.altitudePFD = -9999;
|
||||
notification.altitudeDigits = -9999;
|
||||
notification.altitudeDifference = -9999;
|
||||
}
|
||||
|
@ -1814,7 +1814,7 @@ var canvas_pfd = {
|
|||
}
|
||||
|
||||
if (notification.altimeterStd == 1) {
|
||||
if (notification.altitude < fmgc.FMGCInternal.transAlt and fmgc.FMGCInternal.phase == 4) {
|
||||
if (notification.altitudePFD < fmgc.FMGCInternal.transAlt and fmgc.FMGCInternal.phase == 4) {
|
||||
if (me.number == 0) {
|
||||
if (qnh_going1 == 0) {
|
||||
qnhTimer1.start();
|
||||
|
@ -1848,7 +1848,7 @@ var canvas_pfd = {
|
|||
me["QNH_box"].show();
|
||||
}
|
||||
} else {
|
||||
if (notification.altitude >= fmgc.FMGCInternal.transAlt and fmgc.FMGCInternal.phase == 2) {
|
||||
if (notification.altitudePFD >= fmgc.FMGCInternal.transAlt and fmgc.FMGCInternal.phase == 2) {
|
||||
if (me.number == 0) {
|
||||
if (qnh_going1 == 0) {
|
||||
qnhTimer1.start();
|
||||
|
|
Loading…
Reference in a new issue