Merge branch 'dev' into 3D
This commit is contained in:
commit
b8d996dfb2
25 changed files with 399 additions and 705 deletions
|
@ -4855,7 +4855,6 @@
|
|||
<file>Aircraft/A320-family/Nasal/MCDU/PERFTO.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/RADNAV.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/DATA.nas</file>
|
||||
<file>Aircraft/A320-family/Nasal/MCDU/STATUS.nas</file>
|
||||
</mcdu>
|
||||
<!-- Traffic layer from E-jet -->
|
||||
<traffic>
|
||||
|
|
|
@ -34,39 +34,44 @@
|
|||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>The Aircraft Config has detected that rendering settings are not set properly!</label>
|
||||
<label>Your rendering settings will not allow all graphical features of the aircraft to be visible!</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>This means lighting effects on the exterior and in the virtual cockpit will not be visible.</label>
|
||||
<label>This means certain lighting effects will not be usable, including cockpit floodlights. </label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>ALS, and custom shader settings must be on.</label>
|
||||
<label>For the best experience:</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Landmass shader must be at least 4 for lightspots to work.</label>
|
||||
<label>* Atmospheric Light Scattering should be enabled</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Model shader must be at least 2 for lightmaps to work.</label>
|
||||
<label>* Landmass shader should be at least 4 for external lights to illuminate the ground</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>* Model shader should be at least 2 for lighting to illuminate the aircraft model</label>
|
||||
</text>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Would you like the Aircraft Config to automatically turn on ALS and fix shader settings?</label>
|
||||
<label>Would you like Aircraft Config to automatically set these minimum basic settings?</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>If the settings do not save after fixing, try quitting FlightGear through File -> Exit after fixing.</label>
|
||||
<label>To save these settings, make sure to quit FlightGear with File -> Exit after your flight is complete.</label>
|
||||
</text>
|
||||
|
||||
</group>
|
||||
|
@ -105,8 +110,8 @@
|
|||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>Yes, fix all settings</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<legend>Apply minimum settings</legend>
|
||||
<pref-width>200</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
|
@ -120,8 +125,8 @@
|
|||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>Yes, but I'll fix shaders myself</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<legend>Advanced: View Shader Settings</legend>
|
||||
<pref-width>200</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
|
@ -143,8 +148,8 @@
|
|||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>I don't care</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<legend>Ignore</legend>
|
||||
<pref-width>150</pref-width>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
|
|
|
@ -49,52 +49,41 @@ var canvas_IESI = {
|
|||
obj.AI_horizon_trans = obj["AI_horizon"].createTransform();
|
||||
obj.AI_horizon_rot = obj["AI_horizon"].createTransform();
|
||||
|
||||
obj._aiCenter = obj["AI_center"].getCenter();
|
||||
obj._cachedInhg = nil;
|
||||
obj._excessMotion = 0;
|
||||
obj._fast = 0;
|
||||
obj._cachedMode = nil;
|
||||
obj._canReset = 0;
|
||||
obj._excessMotionInInit = 0;
|
||||
obj._fastInit = 0;
|
||||
obj._IESITime = 0;
|
||||
obj._showIESI = 0;
|
||||
obj.ASI = 0;
|
||||
obj.canReset = 0;
|
||||
obj.isNegativeAlt = 0;
|
||||
obj.middleAltOffset = nil;
|
||||
obj._isNegativeAlt = 0;
|
||||
obj._middleAltOffset = nil;
|
||||
obj._powerResult = 0;
|
||||
obj._roll = 0;
|
||||
|
||||
obj.update_items = [
|
||||
props.UpdateManager.FromHashValue("airspeed", nil, func(val) {
|
||||
# Subtract 30, since the scale starts at 30, but don't allow less than 0, or more than 520 knots
|
||||
if (val <= 30) {
|
||||
obj.ASI = 0;
|
||||
} else if (val >= 520) {
|
||||
obj.ASI = 490;
|
||||
} else {
|
||||
obj.ASI = val - 30;
|
||||
}
|
||||
obj["ASI_scale"].setTranslation(0, obj.ASI * 8.295);
|
||||
obj["ASI_scale"].setTranslation(0, math.clamp(val - 30, 0, 490) * 8.295);
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altitude","altitude_ind"], nil, func(val) {
|
||||
if (val.altitude > 50000) {
|
||||
val.altitude = 50000;
|
||||
} elsif (val.altitude < -2000) {
|
||||
val.altitude = -2000;
|
||||
}
|
||||
|
||||
val.altitude = math.clamp(val.altitude, -2000, 50000);
|
||||
if (val.altitude < 0) {
|
||||
obj["negText"].show();
|
||||
obj.isNegativeAlt = 1;
|
||||
obj._isNegativeAlt = 1;
|
||||
} else {
|
||||
obj["negText"].hide();
|
||||
obj.isNegativeAlt = 0;
|
||||
obj._isNegativeAlt = 0;
|
||||
}
|
||||
|
||||
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;
|
||||
obj._middleAltOffset = -(obj.altOffset - 1) * 258.5528;
|
||||
} else {
|
||||
obj.middleAltOffset = -obj.altOffset * 258.5528;
|
||||
obj._middleAltOffset = -obj.altOffset * 258.5528;
|
||||
}
|
||||
|
||||
obj["ALT_scale"].setTranslation(0, -obj.middleAltOffset);
|
||||
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)));
|
||||
|
@ -114,20 +103,16 @@ var canvas_IESI = {
|
|||
obj.altTens = num(right(sprintf("%02d", val.altitude), 2));
|
||||
obj["ALT_tens"].setTranslation(0, obj.altTens * 3.16);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("mach", nil, func(val) {
|
||||
if (val >= 0.5) {
|
||||
obj._machWasAbove50 = 1;
|
||||
obj["ASI_mach_decimal"].show();
|
||||
obj["ASI_mach"].show();
|
||||
} elsif (val >= 0.45 and obj._machWasAbove50) {
|
||||
props.UpdateManager.FromHashValue("showMach", nil, func(val) {
|
||||
if (val) {
|
||||
obj["ASI_mach_decimal"].show();
|
||||
obj["ASI_mach"].show();
|
||||
} else {
|
||||
obj._machWasAbove50 = 0;
|
||||
obj["ASI_mach_decimal"].hide();
|
||||
obj["ASI_mach"].hide();
|
||||
}
|
||||
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("mach", nil, func(val) {
|
||||
if (val >= 0.999) {
|
||||
obj["ASI_mach"].setText("99");
|
||||
} else {
|
||||
|
@ -138,8 +123,9 @@ var canvas_IESI = {
|
|||
obj.AI_horizon_trans.setTranslation(0, val * 16.74);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("roll", nil, func(val) {
|
||||
obj.AI_horizon_rot.setRotation(-val * D2R, obj["AI_center"].getCenter());
|
||||
obj["AI_bank"].setRotation(-val * D2R);
|
||||
obj._roll = -val * D2R;
|
||||
obj.AI_horizon_rot.setRotation(obj._roll, obj._aiCenter);
|
||||
obj["AI_bank"].setRotation(obj._roll);
|
||||
}),
|
||||
props.UpdateManager.FromHashValue("skid", nil, func(val) {
|
||||
if (abs(val) >= 84.99) {
|
||||
|
@ -149,9 +135,6 @@ var canvas_IESI = {
|
|||
obj["AI_slipskid"].show();
|
||||
}
|
||||
}),
|
||||
props.UpdateManager.FromHashList(["altimeter_mode","qnh_hpa","qnh_inhg"], nil, func(val) {
|
||||
obj.updateQNH(val);
|
||||
}),
|
||||
];
|
||||
return obj;
|
||||
},
|
||||
|
@ -159,22 +142,21 @@ var canvas_IESI = {
|
|||
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"];
|
||||
},
|
||||
update: func(notification) {
|
||||
if (notification.qnh_inhg != me._cachedInhg) {
|
||||
me._cachedInhg = notification.qnh_inhg;
|
||||
me.updateQNH(notification);
|
||||
}
|
||||
me._powerResult = me.updatePower(notification);
|
||||
if (me._powerResult == 0) { return; }
|
||||
|
||||
me.updatePower(notification);
|
||||
if (me.group.getVisible() == 0) {
|
||||
return;
|
||||
if (notification.qnh_inhg != me._cachedInhg or notification.altimeter_mode != me._cachedMode) {
|
||||
me._cachedInhg = notification.qnh_inhg;
|
||||
me._cachedMode = notification.altimeter_mode;
|
||||
me.updateQNH(notification);
|
||||
}
|
||||
|
||||
if (me._IESITime + 90 >= notification.elapsedTime) {
|
||||
if (notification.groundspeed > 2) {
|
||||
me._excessMotion = 1;
|
||||
me._excessMotionInInit = 1;
|
||||
}
|
||||
|
||||
if (me._fast) {
|
||||
if (me._fastInit) {
|
||||
me["IESI"].show();
|
||||
me["IESI_Init"].hide();
|
||||
me["AI_bank"].hide();
|
||||
|
@ -203,7 +185,7 @@ var canvas_IESI = {
|
|||
me["metricM"].show();
|
||||
me["metricBox"].show();
|
||||
|
||||
if (me.isNegativeAlt) {
|
||||
if (me._isNegativeAlt) {
|
||||
me["negText2"].show();
|
||||
} else {
|
||||
me["negText2"].hide();
|
||||
|
@ -215,7 +197,7 @@ var canvas_IESI = {
|
|||
me["negText2"].hide();
|
||||
}
|
||||
|
||||
if (!me._excessMotion) {
|
||||
if (!me._excessMotionInInit) {
|
||||
me["IESI_Init"].hide();
|
||||
me["IESI"].show();
|
||||
me["AI_bank"].show();
|
||||
|
@ -260,59 +242,43 @@ var canvas_IESI = {
|
|||
} else {
|
||||
me["QNH_setting"].setText(sprintf("%4.0f", notification.qnh_hpa));
|
||||
}
|
||||
me["QNH_setting"].show();
|
||||
me["QNH_std"].hide();
|
||||
me["QNH_setting"].show();
|
||||
}
|
||||
},
|
||||
_transientVar: 0,
|
||||
updatePower: func(notification) {
|
||||
# todo 20W power consumption
|
||||
if (notification.attReset == 1 and me.canReset) {
|
||||
me.canReset = 0;
|
||||
me._excessMotion = 0;
|
||||
me._fast = 1;
|
||||
if (notification.attReset == 1 and me._canReset) {
|
||||
me._canReset = 0;
|
||||
me._excessMotionInInit = 0;
|
||||
me._fastInit = 1;
|
||||
iesi_init.setBoolValue(0);
|
||||
} else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me.canReset) {
|
||||
me.canReset = 1;
|
||||
} else if (me._IESITime + 90 < notification.elapsedTime and notification.iesiInit and !me._canReset) {
|
||||
me._canReset = 1;
|
||||
}
|
||||
|
||||
if (notification.dcEss >= 25 or (notification.relay7XB and notification.dcHot1703 >= 25)) {
|
||||
me._showIESI = 1;
|
||||
if (notification.iesiPowered) {
|
||||
if (notification.acconfig != 1 and notification.iesiInit != 1) {
|
||||
iesi_init.setBoolValue(1);
|
||||
if (me._fast) {
|
||||
me._IESITime = notification.elapsedTime - 80;
|
||||
} else {
|
||||
me._IESITime = notification.elapsedTime;
|
||||
}
|
||||
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) {
|
||||
if (!me._transientVar) {
|
||||
me._transientVar = 1;
|
||||
settimer(func() {
|
||||
if (systems.ELEC.Bus.dcEss.getValue() >= 25 or (systems.ELEC.Bus.dcHot1703.getValue() >= 25 and systems.ELEC.Relay.relay7XB.getValue())) {
|
||||
me._transientVar = 0;
|
||||
} else {
|
||||
me.canReset = 0;
|
||||
me._excessMotion = 0;
|
||||
me._fast = 0;
|
||||
me._showIESI = 0;
|
||||
me._transientVar = 0;
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
}, 0.2); # 200ms delay power transients
|
||||
}
|
||||
me._canReset = 0;
|
||||
me._excessMotionInInit = 0;
|
||||
me._fastInit = 0;
|
||||
iesi_init.setBoolValue(0);
|
||||
}
|
||||
|
||||
if (me._showIESI and notification.iesiBrt > 0.01) {
|
||||
if (notification.iesiPowered and notification.iesiBrt > 0.01) {
|
||||
me.group.setVisible(1);
|
||||
pts.Instrumentation.Iesi.lcdOn.setBoolValue(1);
|
||||
return 1;
|
||||
} else {
|
||||
me.group.setVisible(0);
|
||||
pts.Instrumentation.Iesi.lcdOn.setBoolValue(0);
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -354,13 +320,14 @@ var input = {
|
|||
"attReset": "/instrumentation/iesi/att-reset",
|
||||
"iesiBrt": "/controls/lighting/DU/iesi",
|
||||
"iesiInit": "/instrumentation/iesi/iesi-init",
|
||||
"iesiPowered": "/instrumentation/iesi/power/power-on",
|
||||
"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",
|
||||
"roll": "/orientation/roll-deg",
|
||||
"skid": "/instrumentation/iesi/slip-skid",
|
||||
"relay7XB": "/systems/electrical/sources/si-1/inverter-control/relay-7xb",
|
||||
"showMach": "/instrumentation/iesi/display/show-mach",
|
||||
};
|
||||
|
||||
foreach (var name; keys(input)) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,6 @@
|
|||
var airwaysPage = {
|
||||
title: [nil, nil, nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -45,7 +44,6 @@ var airwaysPage = {
|
|||
me.R1 = [nil, "TO ", "blu"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
makeTmpy: func() {
|
||||
|
@ -67,7 +65,6 @@ var airwaysPage = {
|
|||
}
|
||||
},
|
||||
updateAirways: func(index, airwayName) {
|
||||
me.fontMatrix[0][index - 1] = 0;
|
||||
if (index == 1) {
|
||||
me.L1[0] = airwayName;
|
||||
} elsif (index == 2) {
|
||||
|
|
|
@ -5,7 +5,6 @@ var isNoVia = [0, 0, 0];
|
|||
var arrivalPage = {
|
||||
title: [nil, nil, nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -132,7 +131,6 @@ var arrivalPage = {
|
|||
_setupPageWithData: func() {
|
||||
me.title = ["ARRIVAL", " TO ", left(me.id, 4)];
|
||||
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
|
||||
|
@ -178,7 +176,6 @@ var arrivalPage = {
|
|||
me.R4 = [nil, nil, "ack"];
|
||||
me.R5 = [nil, nil, "ack"];
|
||||
me.R6 = [nil, nil, "ack"];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
},
|
||||
|
|
|
@ -2,7 +2,6 @@ var latReq = {
|
|||
title: [nil, nil, nil],
|
||||
titleColour: "wht",
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var atisPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -77,7 +76,6 @@ var atisPage = {
|
|||
me.R6 = ["PRINT ", nil, "blu"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "wht", "wht"], ["ack", "ack", "ack", "ack", "ack", "blu"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
update: func() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var closestAirportPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -40,12 +39,13 @@ var closestAirportPage = {
|
|||
me.title = "CLOSEST AIRPORTS";
|
||||
me.C1[1] = " BRG DIST";
|
||||
me.R1[1] = "UTC ";
|
||||
me.L5 = ["[ ]", nil, "blu"];
|
||||
me.L5 = ["[ ]", nil, "blu"];
|
||||
me.C5 = [nil, me.frozen ? "LIST FROZEN" : nil, "grn"];
|
||||
me.R5 = [nil, nil, "grn"];
|
||||
me.L6 = [" FREEZE", nil, "blu"];
|
||||
me.R6 = ["EFOB/WIND ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "blu"], ["ack", "ack", "ack", "ack", "ack", "wht"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
me.update();
|
||||
me.updateBrgDist();
|
||||
|
@ -98,32 +98,29 @@ var closestAirportPage = {
|
|||
var magvarLocal = magvar();
|
||||
if (size(me.airports) >= 1) {
|
||||
me.cdVector[0] = courseAndDistance(me.airports[0]);
|
||||
me.C1 = [math.round(me.cdVector[0][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"];
|
||||
me.C1 = [sprintf("%03d",me.cdVector[0][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"];
|
||||
}
|
||||
if (size(me.airports) >= 2) {
|
||||
me.cdVector[1] = courseAndDistance(me.airports[1]);
|
||||
me.C2 = [math.round(me.cdVector[1][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[1][1]) , nil, "grn"];
|
||||
me.C2 = [sprintf("%03d",me.cdVector[1][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[1][1]) , nil, "grn"];
|
||||
}
|
||||
if (size(me.airports) >= 3) {
|
||||
me.cdVector[2] = courseAndDistance(me.airports[2]);
|
||||
me.C3 = [math.round(me.cdVector[2][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[2][1]), nil, "grn"];
|
||||
me.C3 = [sprintf("%03d",me.cdVector[2][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[2][1]), nil, "grn"];
|
||||
}
|
||||
if (size(me.airports) >= 4) {
|
||||
me.cdVector[3] = courseAndDistance(me.airports[3]);
|
||||
me.C4 = [math.round(me.cdVector[3][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[3][1]), nil, "grn"];
|
||||
me.C4 = [sprintf("%03d",me.cdVector[3][0] - magvarLocal) ~ "° " ~ math.round(me.cdVector[3][1]), nil, "grn"];
|
||||
}
|
||||
if (me.manAirport != nil) {
|
||||
me.C5 = [math.round(courseAndDistance(me.manAirport)[0] - magvarLocal) ~ " " ~ math.round(courseAndDistance(me.manAirport)[1]), nil, "grn"];
|
||||
me.C5 = [sprintf("%03d",courseAndDistance(me.manAirport)[0] - magvarLocal) ~ "° " ~ math.round(courseAndDistance(me.manAirport)[1]), me.frozen ? "LIST FROZEN" : nil, "grn"];
|
||||
}
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
manAirportCall: func(id) {
|
||||
if (id == "CLR") {
|
||||
me.manAirport = nil;
|
||||
me.L5 = ["[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
me.C5 = [nil, nil, "grn"];
|
||||
me.R5 = [nil, nil, "grn"];
|
||||
me._setupPageWithData();
|
||||
return;
|
||||
}
|
||||
if (size(id) > 4) {
|
||||
|
@ -135,6 +132,7 @@ var closestAirportPage = {
|
|||
me.fontMatrix[0][4] = 0;
|
||||
me.L5 = [id, nil, "grn"];
|
||||
me.R5 = ["----", nil, "grn"];
|
||||
mcdu_scratchpad.scratchpads[me.computer].empty();
|
||||
}
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ var isNoTransDep = [0, 0, 0];
|
|||
var departurePage = {
|
||||
title: [nil, nil, nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -106,7 +105,6 @@ var departurePage = {
|
|||
_setupPageWithData: func() {
|
||||
me.title = ["DEPARTURE", " FROM ", left(me.id, 4)];
|
||||
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
|
||||
|
@ -147,7 +145,6 @@ var departurePage = {
|
|||
me.R4 = [nil, nil, "ack"];
|
||||
me.R5 = [nil, nil, "ack"];
|
||||
me.R6 = [nil, nil, "ack"];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
},
|
||||
|
|
|
@ -3,7 +3,6 @@ var dirToFlag = 0;
|
|||
var dirTo = {
|
||||
title: [nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -46,7 +45,6 @@ var dirTo = {
|
|||
me.R5 = ["[ ] ", "RADIAL OUT ", "blu"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "blu", "blu", "blu", "blu", "ack"], ["ack", "blu", "blu", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
|
||||
me.updateFromFpln();
|
||||
me.updateTmpy();
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
|
@ -148,7 +146,6 @@ var dirTo = {
|
|||
fieldL1: func(text, override = 0, overrideIndex = -1) {
|
||||
me.makeTmpy();
|
||||
me.L1[0] = text;
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
|
||||
if (size(text) == 16) {
|
||||
# lat lon
|
||||
var lat = split("/", text)[0];
|
||||
|
@ -237,7 +234,6 @@ var dirTo = {
|
|||
leftFieldBtn: func(index) {
|
||||
me.makeTmpy();
|
||||
me.L1[0] = me.vector[index - 2].wp_name;
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
|
||||
fmgc.flightPlanController.directTo(me.vector[index - 2], me.computer);
|
||||
me.arrowsMatrix[0][1] = 0;
|
||||
# FIGURE OUT HOW TO MAKE IT SO IT DOESN'T DELETE THE WAYPOINTS ON DIR TO BUT DOES IN FLIGHTPLAN
|
||||
|
@ -254,7 +250,6 @@ var dirTo = {
|
|||
dirToFlag = 0;
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);
|
||||
me.L1 = [" [ ]", " WAYPOINT", "blu"];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
|
||||
me.R1 = ["---- --- ", "UTC DIST ", "wht"];
|
||||
} else {
|
||||
mcdu_message(me.computer, "NOT ALLOWED");
|
||||
|
@ -265,7 +260,6 @@ var dirTo = {
|
|||
dirToFlag = 0;
|
||||
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 1);
|
||||
me.L1 = [" [ ]", " WAYPOINT", "blu"];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0]];
|
||||
me.R1 = ["---- --- ", "UTC DIST ", "wht"];
|
||||
setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); # todo - remember horizontal srcoll of f-plna?
|
||||
} else {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
var duplicateNamesPage = {
|
||||
title: nil,
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -49,7 +48,6 @@ var duplicateNamesPage = {
|
|||
me.title = "DUPLICATE NAMES";
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
|
||||
me.distances = [];
|
||||
for (var i = 0; i < size(me.vector); i += 1) {
|
||||
|
|
|
@ -160,22 +160,22 @@ var fplnItem = {
|
|||
if (me.wp.wp_name == "DISCONTINUITY") {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(4, me.wp, me.index, me.computer);
|
||||
} elsif (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
if (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer);
|
||||
} elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer);
|
||||
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(2, me.wp, me.index, me.computer);
|
||||
} elsif (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer);
|
||||
} elsif (fmgc.flightPlanController.flightplans[me.computer].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer);
|
||||
} else {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(3, me.wp, me.index, me.computer);
|
||||
}
|
||||
} else {
|
||||
if (me.index == fmgc.flightPlanController.arrivalIndex[2]) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer);
|
||||
} elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer);
|
||||
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(2, me.wp, me.index, me.computer);
|
||||
} elsif (me.index == fmgc.flightPlanController.arrivalIndex[2]) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(1, me.wp, me.index, me.computer);
|
||||
} elsif (fmgc.flightPlanController.flightplans[2].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(0, me.wp, me.index, me.computer);
|
||||
} else {
|
||||
canvas_mcdu.myLatRev[me.computer] = latRev.new(3, me.wp, me.index, me.computer);
|
||||
}
|
||||
|
@ -190,22 +190,22 @@ var fplnItem = {
|
|||
canvas_mcdu.myVertRev[me.computer] = nil;
|
||||
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
if (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} if (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(3, me.wp.wp_name, me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (me.index == fmgc.flightPlanController.arrivalIndex[me.computer]) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} if (fmgc.flightPlanController.flightplans[me.computer].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[me.computer].departure.id) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} else {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(2, me.wp.wp_name, me.index, me.computer, me.wp, me.plan);
|
||||
}
|
||||
} else {
|
||||
if (me.index == fmgc.flightPlanController.arrivalIndex[2]) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
if (me.wp.wp_name == "PPOS" or me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1)) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(3, me.wp.wp_name, me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (me.index == fmgc.flightPlanController.arrivalIndex[2]) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(1, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} elsif (fmgc.flightPlanController.flightplans[2].departure != nil and left(me.wp.wp_name, 4) == fmgc.flightPlanController.flightplans[2].departure.id) {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(0, left(me.wp.wp_name, 4), me.index, me.computer, me.wp, me.plan);
|
||||
} else {
|
||||
canvas_mcdu.myVertRev[me.computer] = vertRev.new(2, me.wp.wp_name, me.index, me.computer, me.wp, me.plan);
|
||||
}
|
||||
|
@ -291,7 +291,6 @@ var staticText = {
|
|||
};
|
||||
|
||||
var fplnPage = { # this one is only created once, and then updated - remember this
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
L3: [nil, nil, "ack"],
|
||||
|
@ -509,7 +508,7 @@ var fplnPage = { # this one is only created once, and then updated - remember th
|
|||
setprop("MCDU[" ~ me.computer ~ "]/page", "LATREV");
|
||||
}
|
||||
} else {
|
||||
if (size(me.outputList) >= index) {
|
||||
if (size(me.outputList) >= index and !mcdu_scratchpad.scratchpads[me.computer].showTypeIMsg and !mcdu_scratchpad.scratchpads[me.computer].showTypeIIMsg) {
|
||||
if (size(mcdu_scratchpad.scratchpads[me.computer].scratchpad) > 0) {
|
||||
var returny = fmgc.flightPlanController.scratchpad(mcdu_scratchpad.scratchpads[me.computer].scratchpad, (index - 1 + me.scroll), me.computer);
|
||||
if (returny == 3) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
var holdPage = {
|
||||
title: [nil, nil, nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -41,37 +40,35 @@ var holdPage = {
|
|||
me.title = ["HOLD", " AT ", me.waypoint.wp_name];
|
||||
me.titleColour = "wht";
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 1, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["wht", "wht", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["blu", "blu", "ack", "ack", "ack", "ack"]];
|
||||
if (me.waypoint.fly_type == "Hold") {
|
||||
me.makeTmpy();
|
||||
me.L1 = [" " ~ sprintf("%03.0f", me.waypoint.hold_inbound_radial), "INB CRS", "blu"];
|
||||
me.fontMatrix[0][0] = 0;
|
||||
me.L1 = [sprintf("%03.0f°", me.waypoint.hold_inbound_radial), "INB CRS", "blu"];
|
||||
|
||||
if (me.waypoint.hold_is_left_handed) {
|
||||
me.L2 = [" L", " TURN", "blu"];
|
||||
me.L2 = ["L", " TURN", "blu"];
|
||||
} else {
|
||||
me.L2 = [" R", " TURN", "blu"];
|
||||
me.L2 = ["R", " TURN", "blu"];
|
||||
}
|
||||
|
||||
if (me.waypoint.hold_is_distance) {
|
||||
me.L2 = [" -.-/" ~ me.waypoint.hold_time_or_distance, "TIME/DIST", "blu"];
|
||||
me.L3 = [" -.-/" ~ me.waypoint.hold_time_or_distance, "TIME/DIST", "blu"];
|
||||
} else {
|
||||
me.L2 = [" " ~ sprintf("%3.1f", (me.waypoint.hold_time_or_distance / 60)) ~ "/----", "TIME/DIST", "blu"];
|
||||
me.L3 = [sprintf("%3.1f", (me.waypoint.hold_time_or_distance / 60)) ~ "/----", "TIME/DIST", "blu"];
|
||||
}
|
||||
me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
me.R1 = ["COMPUTED ", nil, "blu"];
|
||||
me.R2 = ["DATABASE ", nil, "yel"];
|
||||
me.arrowsMatrix[1][1] = 0;
|
||||
} else {
|
||||
me.L1 = [" 100", "INB CRS", "blu"];
|
||||
me.L2 = [" R", " TURN", "blu"];
|
||||
me.L1 = ["100°", "INB CRS", "blu"];
|
||||
me.L2 = ["R", " TURN", "blu"];
|
||||
if (pts.Instrumentation.Altimeter.indicatedFt.getValue() >= 14000) {
|
||||
me.L2 = [" 1.5/----", "TIME/DIST", "blu"];
|
||||
me.L3 = ["1.5/----", "TIME/DIST", "blu"];
|
||||
} else {
|
||||
me.L2 = [" 1.0/----", "TIME/DIST", "blu"];
|
||||
me.L3 = ["1.0/----", "TIME/DIST", "blu"];
|
||||
}
|
||||
me.R1 = ["COMPUTED ", nil, "wht"];
|
||||
me.R2 = ["DATABASE ", nil, "wht"];
|
||||
me.R1 = ["COMPUTED ", nil, "blu"];
|
||||
me.R2 = ["DATABASE ", nil, "blu"];
|
||||
}
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.C4 = ["LAST EXIT", nil, "wht"];
|
||||
|
@ -87,6 +84,7 @@ var holdPage = {
|
|||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
me.L1[2] = "yel";
|
||||
me.L2[2] = "yel";
|
||||
me.L3[2] = "yel";
|
||||
me.L6 = [" F-PLN", " TMPY", "yel"];
|
||||
me.R6 = ["INSERT ", " TMPY", "yel"];
|
||||
me.arrowsColour[0][5] = "yel";
|
||||
|
@ -95,6 +93,7 @@ var holdPage = {
|
|||
} else {
|
||||
me.L1[2] = "blu";
|
||||
me.L2[2] = "blu";
|
||||
me.L3[2] = "blu";
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R6 = [nil, nil, "ack"];
|
||||
me.arrowsColour[0][5] = "wht";
|
||||
|
|
|
@ -2,7 +2,6 @@ var latRev = {
|
|||
title: [nil, nil, nil],
|
||||
titleColour: "wht",
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -48,22 +47,22 @@ var latRev = {
|
|||
_setupPageWithData: func() {
|
||||
if (me.type == 2) {
|
||||
me.title = ["LAT REV", " FROM ", "PPOS"];
|
||||
var acPos = geo.aircraft_position();
|
||||
me.subtitle = [dmsToString(sprintf(acPos.lat()), "lat"), dmsToString(sprintf(acPos.lon()), "lon")];
|
||||
me.L2 = [" OFFSET", nil, "wht"];
|
||||
me.L3 = [" HOLD", nil, "wht"];
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R1 = ["FIX INFO ", nil, "wht"];
|
||||
me.R2 = ["[ ]°/[ ]°/[ ]", "LL XING/INCR/NO", "blu"];
|
||||
me.R2 = ["[ ]°/[]°/[]", "LL XING/INCR/NO", "blu"];
|
||||
me.arrowsMatrix = [[0, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "wht", "wht", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0]];
|
||||
} elsif (me.type == 4) {
|
||||
me.title = ["LAT REV", " FROM ", "DISCON"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST", "blu"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST ", "blu"];
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0]];
|
||||
} else {
|
||||
if (me.type == 0) {
|
||||
me.title = ["LAT REV", " FROM ", left(me.wpt.wp_name, 4)];
|
||||
|
@ -72,17 +71,18 @@ var latRev = {
|
|||
} else {
|
||||
me.depAirport = findAirportsByICAO(me.wpt.wp_name);
|
||||
}
|
||||
me.subtitle = [dmsToString(sprintf(me.depAirport[0].lat), "lat"), dmsToString(sprintf(me.depAirport[0].lon), "lon")];
|
||||
if (size(me.depAirport) > 0) {
|
||||
me.subtitle = [dmsToString(sprintf(me.depAirport[0].lat), "lat"), dmsToString(sprintf(me.depAirport[0].lon), "lon")];
|
||||
}
|
||||
me.L1 = [" DEPARTURE", nil, "wht"];
|
||||
me.L2 = [" OFFSET", nil, "wht"];
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R1 = ["FIX INFO ", nil, "wht"];
|
||||
me.R2 = ["[ ]°/[ ]°/[ ]", "LL XING/INCR/NO", "blu"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST", "blu"];
|
||||
me.R2 = ["[ ]°/[]°/[]", "LL XING/INCR/NO", "blu"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST ", "blu"];
|
||||
me.arrowsMatrix = [[1, 1, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["wht", "wht", "ack", "ack", "ack", "wht"], ["wht", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0]];
|
||||
} elsif (me.type == 1) {
|
||||
me.title = ["LAT REV", " FROM ", left(me.wpt.wp_name, 4)];
|
||||
me.arrowsMatrix = [[0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0]];
|
||||
|
@ -92,7 +92,9 @@ var latRev = {
|
|||
} else {
|
||||
me.arrAirport = findAirportsByICAO(me.wpt.wp_name);
|
||||
}
|
||||
me.subtitle = [dmsToString(sprintf(me.arrAirport[0].lat), "lat"), dmsToString(sprintf(me.arrAirport[0].lon), "lon")];
|
||||
if (size(me.arrAirport) > 0) {
|
||||
me.subtitle = [dmsToString(sprintf(me.arrAirport[0].lat), "lat"), dmsToString(sprintf(me.arrAirport[0].lon), "lon")];
|
||||
}
|
||||
me.L3 = [" ALTN", nil, "wht"];
|
||||
if (fmgc.FMGCInternal.altAirportSet) {
|
||||
me.L4 = [" ALTN", " ENABLE", "blu"];
|
||||
|
@ -102,8 +104,7 @@ var latRev = {
|
|||
}
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R1 = ["ARRIVAL ", nil, "wht"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0]];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
} elsif (me.type == 3) {
|
||||
me.title = ["LAT REV", " FROM ", me.wpt.wp_name];
|
||||
me.arrowsMatrix = [[0, 0, 1, 1, 0, 1], [1, 0, 0, 0, 1, 0]];
|
||||
|
@ -121,10 +122,9 @@ var latRev = {
|
|||
}
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R1 = ["FIX INFO ", nil, "wht"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST", "blu"];
|
||||
me.R3 = ["[ ]", "NEXT WPT ", "blu"];
|
||||
me.R4 = ["[ ]", "NEW DEST ", "blu"];
|
||||
me.R5 = ["AIRWAYS ", nil, "wht"];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0]];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -164,7 +164,7 @@ var dmsToString = func(dms, type) {
|
|||
} else {
|
||||
var sign = degrees >= 0 ? "E" : "W";
|
||||
}
|
||||
return abs(degrees) ~ "g" ~ minutes ~ " " ~ sign;
|
||||
return abs(degrees) ~ "°" ~ minutes ~ sign;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -526,7 +526,7 @@ var lskbutton = func(btn, i) {
|
|||
} else if (page == "PERFAPPR") {
|
||||
perfAPPRInput("L3",i);
|
||||
} else if (page == "STATUS") {
|
||||
statusInput("L3",i);
|
||||
fmgc.switchDatabase();
|
||||
} else if (page == "RADNAV") {
|
||||
radnavInput("L3",i);
|
||||
} else if (page == "DATA") {
|
||||
|
@ -790,7 +790,6 @@ var lskbutton = func(btn, i) {
|
|||
canvas_mcdu.myDuplicate[i].pushButtonLeft(5);
|
||||
} else if (page == "CLOSESTAIRPORT") {
|
||||
canvas_mcdu.myClosestAirport[i].manAirportCall(mcdu_scratchpad.scratchpads[i].scratchpad);
|
||||
mcdu_scratchpad.scratchpads[i].empty();
|
||||
} else if (page == "ATCMENU") {
|
||||
pageNode[i].setValue("NOTIFICATION");
|
||||
} else if (page == "FLTLOG") {
|
||||
|
@ -1188,7 +1187,16 @@ var rskbutton = func(btn, i) {
|
|||
}
|
||||
pageNode[i].setValue("WINDDES");
|
||||
} else if (page == "STATUS") {
|
||||
statusInput("R5",i);
|
||||
if (fmgc.WaypointDatabase.getCount() >= 1) {
|
||||
if (fmgc.WaypointDatabase.confirm[i]) {
|
||||
fmgc.WaypointDatabase.delete(i);
|
||||
fmgc.WaypointDatabase.confirm[i] = 0;
|
||||
} else {
|
||||
fmgc.WaypointDatabase.confirm[i] = 1;
|
||||
}
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else if (page == "PERFTO") {
|
||||
perfTOInput("R5",i);
|
||||
} else if (page == "PERFAPPR") {
|
||||
|
@ -1564,11 +1572,18 @@ var button = func(btn, i, event = "") {
|
|||
if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") {
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
mcdu_scratchpad.scratchpads[i].addChar("+");
|
||||
} else if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "+") {
|
||||
mcdu_scratchpad.scratchpads[i].clear();
|
||||
mcdu_scratchpad.scratchpads[i].addChar("-");
|
||||
} else {
|
||||
mcdu_scratchpad.scratchpads[i].addChar("-");
|
||||
}
|
||||
} else if (btn == "OVFY") {
|
||||
mcdu_scratchpad.scratchpads[i].addChar("@");
|
||||
if (mcdu_scratchpad.scratchpads[i].scratchpad == "") {
|
||||
mcdu_scratchpad.scratchpads[i].addChar("@");
|
||||
} else {
|
||||
mcdu_message(i, "NOT ALLOWED");
|
||||
}
|
||||
} else {
|
||||
mcdu_scratchpad.scratchpads[i].addChar(btn);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var pilotWaypointPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var receivedMessagesPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -63,7 +62,6 @@ var receivedMessagesPage = {
|
|||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["blu", "blu", "blu", "blu", "blu", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
update: func() {
|
||||
|
@ -155,8 +153,6 @@ var receivedMessagesPage = {
|
|||
|
||||
var receivedMessagePage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
L2: [nil, nil, "ack"],
|
||||
|
@ -229,7 +225,6 @@ var receivedMessagePage = {
|
|||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["blu", "blu", "blu", "blu", "blu", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
update: func() {
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
# A3XX mCDU by Joshua Davidson (Octal450), Jonathan Redpath, and Matthew Maring (mattmaring)
|
||||
|
||||
# Copyright (c) 2022 Josh Davidson (Octal450)
|
||||
|
||||
var statusInput = func(key, i) {
|
||||
if (key == "L3") {
|
||||
fmgc.switchDatabase();
|
||||
} elsif (key == "R5") {
|
||||
if (fmgc.WaypointDatabase.confirm[i]) {
|
||||
fmgc.WaypointDatabase.delete(i);
|
||||
fmgc.WaypointDatabase.confirm[i] = 0;
|
||||
} else {
|
||||
fmgc.WaypointDatabase.confirm[i] = 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ var scratchpadSplit = nil;
|
|||
var vertRev = {
|
||||
title: [nil, nil, nil],
|
||||
subtitle: [nil, nil],
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -85,20 +84,16 @@ var vertRev = {
|
|||
me.R2 = ["RTA ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]];
|
||||
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
} elsif (me.type == 2) {
|
||||
me.title = ["VERT REV", " AT ", me.id];
|
||||
me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]];
|
||||
me.L1 = ["", " EFOB ---.-", "wht"];
|
||||
me.R1 = ["", "EXTRA ---.- ", "wht"];
|
||||
me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"];
|
||||
me.speed = me.getSpd();
|
||||
if (me.speed[0] == nil) {
|
||||
me.L3 = [" [ ]", " SPD CSTR", "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
me.L3 = ["[ ]", " SPD CSTR", "blu"];
|
||||
} else {
|
||||
me.L3 = [me.speed[0], " SPD CSTR", me.speed[1]];
|
||||
me.fontMatrix[0][2] = 0;
|
||||
}
|
||||
me.L4 = [" CONSTANT MACH", nil, "wht"];
|
||||
me.L5 = [" WIND DATA", nil, "wht"];
|
||||
|
@ -106,11 +101,9 @@ var vertRev = {
|
|||
me.R2 = ["RTA ", nil, "wht"];
|
||||
me.alt = me.getAlt();
|
||||
if (me.alt[0] == nil) {
|
||||
me.R3 = ["[ ] ", "ALT CSTR ", "blu"];
|
||||
me.fontMatrix[1][2] = 1;
|
||||
me.R3 = ["[ ]", "ALT CSTR ", "blu"];
|
||||
} else {
|
||||
me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]];
|
||||
me.fontMatrix[1][2] = 0;
|
||||
me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]];
|
||||
}
|
||||
me.R6 = ["DES ", nil, "amb"];
|
||||
# When the system does vertical planning, L6 should be RETURN and R6 not used if the MCDU knows the waypoint is during climb or descent.
|
||||
|
@ -138,7 +131,6 @@ var vertRev = {
|
|||
me.R2 = ["RTA ", nil, "wht"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]];
|
||||
me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
} elsif (me.type == 1) {
|
||||
if (size(me.id) > 4) {
|
||||
me.arrAirport = findAirportsByICAO(left(me.id, 4));
|
||||
|
@ -155,7 +147,6 @@ var vertRev = {
|
|||
me.R3 = ["3000", "G/S INTCP", "grn"];
|
||||
me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "wht"], ["ack", "wht", "ack", "ack", "wht", "wht"]];
|
||||
me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
|
||||
}
|
||||
}
|
||||
me.updateR5();
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
var windCLBPage = {
|
||||
title: nil,
|
||||
titleColour: "wht",
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -46,7 +45,6 @@ var windCLBPage = {
|
|||
me.titleColour = "wht";
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 1, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "ack"], ["wht", "ack", "ack", "ack", "wht", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
|
||||
var computer_temp = 2;
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
|
@ -69,10 +67,8 @@ var windCLBPage = {
|
|||
var windStore = fmgc.windController.clb_winds[computer_temp].wind5;
|
||||
if (windStore.set) {
|
||||
me.L5 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
} else {
|
||||
me.L5 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
me.L5 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L5 = [nil, nil, "ack"];
|
||||
|
@ -82,10 +78,8 @@ var windCLBPage = {
|
|||
var windStore = fmgc.windController.clb_winds[computer_temp].wind4;
|
||||
if (windStore.set) {
|
||||
me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
} else {
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L4 = [nil, nil, "ack"];
|
||||
|
@ -95,10 +89,8 @@ var windCLBPage = {
|
|||
var windStore = fmgc.windController.clb_winds[computer_temp].wind3;
|
||||
if (windStore.set) {
|
||||
me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
} else {
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L3 = [nil, nil, "ack"];
|
||||
|
@ -108,10 +100,8 @@ var windCLBPage = {
|
|||
var windStore = fmgc.windController.clb_winds[computer_temp].wind2;
|
||||
if (windStore.set) {
|
||||
me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
} else {
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L2 = [nil, nil, "ack"];
|
||||
|
@ -120,17 +110,15 @@ var windCLBPage = {
|
|||
if (me.items >= 1) {
|
||||
var windStore = fmgc.windController.clb_winds[computer_temp].wind1;
|
||||
if (windStore.set) {
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"];
|
||||
} else {
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"];
|
||||
}
|
||||
}
|
||||
|
||||
me.L6 = [" RETURN", nil, "wht"];
|
||||
me.R1 = [" HISTORY ", "WIND ", "wht"];
|
||||
me.R3 = [" REQUEST ", "WIND ", "amb"];
|
||||
me.R1 = ["WIND ", "HISTORY ", "wht"];
|
||||
me.R3 = ["REQUEST ", "WIND ", "amb"];
|
||||
me.R5 = [" PHASE ", "NEXT ", "wht"];
|
||||
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
var windCRZPage = {
|
||||
title: [nil, nil, nil],
|
||||
titleColour: "wht",
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -60,7 +59,6 @@ var windCRZPage = {
|
|||
me.titleColour = "wht";
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "wht", "wht", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
|
||||
var computer_temp = 2;
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
|
@ -96,10 +94,8 @@ var windCRZPage = {
|
|||
var windStore = fmgc.windController.crz_winds[computer_temp].wind4;
|
||||
if (windStore.set) {
|
||||
me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
} else {
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L4 = [nil, nil, "ack"];
|
||||
|
@ -109,10 +105,8 @@ var windCRZPage = {
|
|||
var windStore = fmgc.windController.crz_winds[computer_temp].wind3;
|
||||
if (windStore.set) {
|
||||
me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
} else {
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L3 = [nil, nil, "ack"];
|
||||
|
@ -122,10 +116,8 @@ var windCRZPage = {
|
|||
var windStore = fmgc.windController.crz_winds[computer_temp].wind2;
|
||||
if (windStore.set) {
|
||||
me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
} else {
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L2 = [nil, nil, "ack"];
|
||||
|
@ -134,31 +126,25 @@ var windCRZPage = {
|
|||
if (me.items >= 1) {
|
||||
var windStore = fmgc.windController.crz_winds[computer_temp].wind1;
|
||||
if (windStore.set) {
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"];
|
||||
} else {
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"];
|
||||
}
|
||||
}
|
||||
|
||||
var windStore = fmgc.windController.crz_winds[computer_temp].sat1;
|
||||
if (windStore.set) {
|
||||
me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
} else {
|
||||
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
|
||||
}
|
||||
} else {
|
||||
if (me.items >= 4) {
|
||||
var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind4;
|
||||
if (windStore.set) {
|
||||
me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
} else {
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L4 = [nil, nil, "ack"];
|
||||
|
@ -168,10 +154,8 @@ var windCRZPage = {
|
|||
var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind3;
|
||||
if (windStore.set) {
|
||||
me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
} else {
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L3 = [nil, nil, "ack"];
|
||||
|
@ -181,10 +165,8 @@ var windCRZPage = {
|
|||
var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind2;
|
||||
if (windStore.set) {
|
||||
me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
} else {
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L2 = [nil, nil, "ack"];
|
||||
|
@ -193,21 +175,17 @@ var windCRZPage = {
|
|||
if (me.items >= 1) {
|
||||
var windStore = fmgc.windController.winds[computer_temp][me.match_location].wind1;
|
||||
if (windStore.set) {
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, " TRU WIND/ALT", "blu"];
|
||||
} else {
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", " TRU WIND/ALT", "blu"];
|
||||
}
|
||||
}
|
||||
|
||||
var windStore = fmgc.windController.winds[computer_temp][me.match_location].sat1;
|
||||
if (windStore.set) {
|
||||
me.L5 = [windStore.temp ~ "/" ~ windStore.altitude, "SAT / ALT", "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
} else {
|
||||
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
me.L5 = ["[ ]/[ ]", "SAT / ALT", "blu"];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ var magVar = nil;
|
|||
var windDESPage = {
|
||||
title: nil,
|
||||
titleColour: "wht",
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -50,7 +49,6 @@ var windDESPage = {
|
|||
me.titleColour = "wht";
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "wht", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0]];
|
||||
|
||||
var computer_temp = 2;
|
||||
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
|
||||
|
@ -73,10 +71,8 @@ var windDESPage = {
|
|||
var windStore = fmgc.windController.des_winds[computer_temp].wind5;
|
||||
if (windStore.set) {
|
||||
me.L5 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
} else {
|
||||
me.L5 = ["[ ]/°[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][4] = 1;
|
||||
}
|
||||
} else {
|
||||
me.L5 = [nil, nil, "ack"];
|
||||
|
@ -86,10 +82,8 @@ var windDESPage = {
|
|||
var windStore = fmgc.windController.des_winds[computer_temp].wind4;
|
||||
if (windStore.set) {
|
||||
me.L4 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
} else {
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][3] = 1;
|
||||
me.L4 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L4 = [nil, nil, "ack"];
|
||||
|
@ -99,10 +93,8 @@ var windDESPage = {
|
|||
var windStore = fmgc.windController.des_winds[computer_temp].wind3;
|
||||
if (windStore.set) {
|
||||
me.L3 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
} else {
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][2] = 1;
|
||||
me.L3 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L3 = [nil, nil, "ack"];
|
||||
|
@ -112,10 +104,8 @@ var windDESPage = {
|
|||
var windStore = fmgc.windController.des_winds[computer_temp].wind2;
|
||||
if (windStore.set) {
|
||||
me.L2 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
} else {
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
me.fontMatrix[0][1] = 1;
|
||||
me.L2 = ["[ ]°/[ ]/[ ]", nil, "blu"];
|
||||
}
|
||||
} else {
|
||||
me.L2 = [nil, nil, "ack"];
|
||||
|
@ -125,10 +115,8 @@ var windDESPage = {
|
|||
var windStore = fmgc.windController.des_winds[computer_temp].wind1;
|
||||
if (windStore.set) {
|
||||
me.L1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude) ~ "/" ~ windStore.altitude, "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
} else {
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
me.fontMatrix[0][0] = 1;
|
||||
me.L1 = ["[ ]°/[ ]/[ ]", "TRU WIND/ALT", "blu"];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,11 +125,9 @@ var windDESPage = {
|
|||
if (fmgc.FMGCInternal.altAirportSet) {
|
||||
var windStore = fmgc.windController.des_winds[computer_temp].alt1;
|
||||
if (windStore.set) {
|
||||
me.R1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude), "ALTN WIND ", "blu"];
|
||||
me.fontMatrix[1][0] = 1;
|
||||
me.R1 = [sprintf("%03.0f", windStore.heading) ~ "°/" ~ sprintf("%03.0f", windStore.magnitude), "ALTN WIND", "blu"];
|
||||
} else {
|
||||
me.R1 = ["[ ]°/[ ]", "ALTN WIND ", "blu"];
|
||||
me.fontMatrix[1][0] = 1;
|
||||
me.R1 = ["[ ]°/[ ]", "ALTN WIND", "blu"];
|
||||
}
|
||||
} else {
|
||||
me.R1 = ["", "", "blu"];
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
var windHISTPage = {
|
||||
title: nil,
|
||||
fontMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsMatrix: [[0, 0, 0, 0, 0, 0],[0, 0, 0, 0, 0, 0]],
|
||||
arrowsColour: [["ack", "ack", "ack", "ack", "ack", "ack"],["ack", "ack", "ack", "ack", "ack", "ack"]],
|
||||
L1: [nil, nil, "ack"], # content, title, colour
|
||||
|
@ -137,7 +136,6 @@ var windHISTPage = {
|
|||
|
||||
me.arrowsMatrix = [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0]];
|
||||
me.arrowsColour = [["ack", "ack", "ack", "ack", "ack", "wht"], ["ack", "ack", "ack", "ack", "ack", "ack"]];
|
||||
me.fontMatrix = [[1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]];
|
||||
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
|
||||
},
|
||||
# makeTmpy: func() {
|
||||
|
|
|
@ -488,7 +488,7 @@
|
|||
|
||||
</channel>
|
||||
|
||||
<channel name="FMGC">
|
||||
<channel name="FMGC" execrate="8">
|
||||
|
||||
<fcs_function name="/FMGC/internal/kts-to-mach-factor">
|
||||
<function>
|
||||
|
@ -510,4 +510,58 @@
|
|||
|
||||
</channel>
|
||||
|
||||
<channel name="IESI" execrate="8">
|
||||
|
||||
<switch name="/instrumentation/iesi/display/show-mach">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/instrumentation/airspeed-indicator/indicated-mach ge 0.5
|
||||
</test>
|
||||
<test logic="AND" value="1">
|
||||
/instrumentation/airspeed-indicator/indicated-mach ge 0.45
|
||||
/instrumentation/iesi/display/show-mach eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/instrumentation/iesi/power/power-command">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/electrical/bus/dc-ess ge 25
|
||||
<test logic="AND">
|
||||
/systems/electrical/sources/si-1/inverter-control/relay-7xb ne 0
|
||||
/systems/electrical/bus/sub-bus/dc-hot-1-703 ge 25
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<actuator name="/instrumentation/iesi/power/power-transient-timer">
|
||||
<input>/instrumentation/iesi/power/power-command</input>
|
||||
<rate_limit sense="decr">5</rate_limit>
|
||||
<rate_limit sene="incr">100</rate_limit>
|
||||
</actuator>
|
||||
|
||||
<switch name="/instrumentation/iesi/power/power-on">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/instrumentation/iesi/power/power-transient-timer ne 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="/instrumentation/iesi/power/power-consumption-w">
|
||||
<function>
|
||||
<sum>
|
||||
<product>
|
||||
<value>16</value>
|
||||
<property>/instrumentation/iesi/power/power-on</property>
|
||||
</product>
|
||||
<product>
|
||||
<value>4</value>
|
||||
<property>/controls/lighting/DU/iesi</property>
|
||||
</product>
|
||||
</sum>
|
||||
</function>
|
||||
</fcs_function>
|
||||
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
Loading…
Add table
Reference in a new issue