1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
legoboyvdlp R 2021-03-01 17:46:09 +00:00
commit 55f81ab7ab
14 changed files with 184 additions and 35 deletions

View file

@ -956,7 +956,7 @@
</fuel> </fuel>
<gear> <gear>
<brake-fans type="bool">0</brake-fans> <brake-fans type="bool">0</brake-fans>
<brake-parking type="bool">0</brake-parking> <brake-parking type="bool">1</brake-parking>
<tiller-cmd-norm type="double">0</tiller-cmd-norm> <tiller-cmd-norm type="double">0</tiller-cmd-norm>
<tiller-enabled type="bool">0</tiller-enabled> <tiller-enabled type="bool">0</tiller-enabled>
<nws-switch type="double">1</nws-switch> <nws-switch type="double">1</nws-switch>
@ -1880,8 +1880,9 @@
<az-limit-deg type="int">30</az-limit-deg> <az-limit-deg type="int">30</az-limit-deg>
<elev-step-deg type="int">10</elev-step-deg> <elev-step-deg type="int">10</elev-step-deg>
<elev-limit type="int">30</elev-limit> <elev-limit type="int">30</elev-limit>
<max-range-m type="int">1219</max-range-m> <max-range-m type="int">1525</max-range-m>
<serviceable type="bool">true</serviceable> <serviceable type="bool">true</serviceable>
<radar-altitude-ft type="double">0</radar-altitude-ft>
</radar-altimeter> </radar-altimeter>
<radar-altimeter n="1"> <radar-altimeter n="1">
@ -1894,8 +1895,9 @@
<az-limit-deg type="int">30</az-limit-deg> <az-limit-deg type="int">30</az-limit-deg>
<elev-step-deg type="int">10</elev-step-deg> <elev-step-deg type="int">10</elev-step-deg>
<elev-limit type="int">30</elev-limit> <elev-limit type="int">30</elev-limit>
<max-range-m type="int">1219</max-range-m> <max-range-m type="int">1525</max-range-m>
<serviceable type="bool">true</serviceable> <serviceable type="bool">true</serviceable>
<radar-altitude-ft type="double">0</radar-altitude-ft>
</radar-altimeter> </radar-altimeter>
<wxr> <wxr>

View file

@ -302,6 +302,7 @@ var colddark = func {
setprop("/controls/lighting/overhead-panel-knb", 0); setprop("/controls/lighting/overhead-panel-knb", 0);
atc.transponderPanel.modeSwitch(1); atc.transponderPanel.modeSwitch(1);
libraries.systemsInit(); libraries.systemsInit();
libraries.variousReset();
failResetOld(); failResetOld();
if (getprop("/engines/engine[1]/n2-actual") < 2) { if (getprop("/engines/engine[1]/n2-actual") < 2) {
colddark_b(); colddark_b();
@ -347,6 +348,7 @@ var beforestart = func {
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0); setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit(); libraries.systemsInit();
libraries.variousReset();
failResetOld(); failResetOld();
# Now the Startup! # Now the Startup!
@ -404,6 +406,9 @@ var beforestart_b = func {
setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/adirs/mcducbtn", 1);
setprop("/controls/switches/beacon", 1); setprop("/controls/switches/beacon", 1);
setprop("/controls/lighting/nav-lights-switch", 1); setprop("/controls/lighting/nav-lights-switch", 1);
setprop("/controls/switches/no-smoking-sign", 0.5);
setprop("/controls/switches/seatbelt-sign", 1);
setprop("/controls/switches/emer-lights", 0.5);
setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[0]/on", 1);
setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[1]/on", 1);
setprop("/controls/radio/rmp[2]/on", 1); setprop("/controls/radio/rmp[2]/on", 1);
@ -438,6 +443,7 @@ var taxi = func {
setprop("/controls/gear/gear-down", 1); setprop("/controls/gear/gear-down", 1);
setprop("/controls/flight/elevator-trim", 0); setprop("/controls/flight/elevator-trim", 0);
libraries.systemsInit(); libraries.systemsInit();
libraries.variousReset();
failResetOld(); failResetOld();
# Now the Startup! # Now the Startup!
@ -496,6 +502,9 @@ var taxi_b = func {
setprop("/controls/switches/beacon", 1); setprop("/controls/switches/beacon", 1);
setprop("/controls/switches/wing-lights", 1); setprop("/controls/switches/wing-lights", 1);
setprop("/controls/lighting/nav-lights-switch", 1); setprop("/controls/lighting/nav-lights-switch", 1);
setprop("/controls/switches/no-smoking-sign", 0.5);
setprop("/controls/switches/seatbelt-sign", 1);
setprop("/controls/switches/emer-lights", 0.5);
setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[0]/on", 1);
setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[1]/on", 1);
setprop("/controls/radio/rmp[2]/on", 1); setprop("/controls/radio/rmp[2]/on", 1);

View file

@ -8807,6 +8807,40 @@
</action> </action>
</animation> </animation>
<!-- ND_L chrono -->
<animation>
<type>pick</type>
<object-name>chrono_cpt</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>/instrumentation/efis/inputs/CHRONO</property>
<value>0</value>
<value>1</value>
<value>2</value>
</binding>
</action>
</animation>
<!-- ND_R chrono -->
<animation>
<type>pick</type>
<object-name>chrono_fo</object-name>
<action>
<button>0</button>
<repeatable>false</repeatable>
<binding>
<command>property-cycle</command>
<property>/instrumentation/efis[1]/inputs/CHRONO</property>
<value>0</value>
<value>1</value>
<value>2</value>
</binding>
</action>
</animation>
<!-- torch --> <!-- torch -->
<animation> <animation>

View file

@ -153,7 +153,6 @@ var baro = props.globals.getNode("/FMGC/internal/baro", 1);
# GA PERF # GA PERF
# AOC - SENSORS # AOC - SENSORS
var parking_brake = props.globals.getNode("/controls/gear/brake-parking", 1);
var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1); var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1);
var doorL1_pos = props.globals.getNode("/sim/model/door-positions/doorl1/position-norm", 1); #FWD door var doorL1_pos = props.globals.getNode("/sim/model/door-positions/doorl1/position-norm", 1); #FWD door
var doorR1_pos = props.globals.getNode("/sim/model/door-positions/doorr1/position-norm", 1); #FWD door var doorR1_pos = props.globals.getNode("/sim/model/door-positions/doorr1/position-norm", 1); #FWD door
@ -846,8 +845,8 @@ var canvas_MCDU_base = {
pageSwitch[i].setBoolValue(1); pageSwitch[i].setBoolValue(1);
} }
me["Simple_R1S"].setText(sprintf("%-10s",(parking_brake.getValue() == 1) ? "SET" : "RELEASED")); me["Simple_R1S"].setText(sprintf("%-10s",(pts.Controls.Gear.parkingBrake.getValue() == 1) ? "SET" : "RELEASED"));
me["Simple_R1"].setText(sprintf("%-10s",(gear0_wow.getValue() == 1) ? "GROUND" : "FLIGHT")); me["Simple_R1"].setText(sprintf("%-10s",(pts.Gear.wow[0].getValue() == 1) ? "GROUND" : "FLIGHT"));
me["Simple_R2S"].setText(sprintf("%-10s",(doorL1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R2S"].setText(sprintf("%-10s",(doorL1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED"));
me["Simple_R2"].setText(sprintf("%-10s",(doorR1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R2"].setText(sprintf("%-10s",(doorR1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED"));
me["Simple_R3S"].setText(sprintf("%-10s",(doorL4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R3S"].setText(sprintf("%-10s",(doorL4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED"));
@ -5192,6 +5191,8 @@ var canvas_MCDU_base = {
me.dynamicPageArrowFunc(myVertRev[i]); me.dynamicPageArrowFunc(myVertRev[i]);
me.colorLeftArrow(myVertRev[i].arrowsColour[0][0],myVertRev[i].arrowsColour[0][1],myVertRev[i].arrowsColour[0][2],myVertRev[i].arrowsColour[0][3],myVertRev[i].arrowsColour[0][4],myVertRev[i].arrowsColour[0][5]); me.colorLeftArrow(myVertRev[i].arrowsColour[0][0],myVertRev[i].arrowsColour[0][1],myVertRev[i].arrowsColour[0][2],myVertRev[i].arrowsColour[0][3],myVertRev[i].arrowsColour[0][4],myVertRev[i].arrowsColour[0][5]);
me.colorRightArrow(myVertRev[i].arrowsColour[1][0],myVertRev[i].arrowsColour[1][1],myVertRev[i].arrowsColour[1][2],myVertRev[i].arrowsColour[1][3],myVertRev[i].arrowsColour[1][4],myVertRev[i].arrowsColour[1][5]);
me.dynamicPageFontFunc(myVertRev[i]); me.dynamicPageFontFunc(myVertRev[i]);

View file

@ -134,12 +134,14 @@ var SimbriefParser = {
fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore; fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore;
} }
var alternateID = me.OFP.getNode("alternate/icao_code").getValue(); var alternateID = me.OFP.getNode("alternate/icao_code") == nil ? nil : me.OFP.getNode("alternate/icao_code").getValue();
var alternates = findAirportsByICAO(alternateID); if (alternateID != nil) {
if (alternates != nil and size(alternates) != 0) { var alternates = findAirportsByICAO(alternateID);
fmgc.FMGCInternal.altAirport = alternateID; if (size(alternates) != 0) {
atsu.ATISInstances[2].newStation(alternateID); fmgc.FMGCInternal.altAirport = alternateID;
fmgc.FMGCInternal.altAirportSet = 1; atsu.ATISInstances[2].newStation(alternateID);
fmgc.FMGCInternal.altAirportSet = 1;
}
} }
var wps = []; var wps = [];

View file

@ -32,7 +32,7 @@ var variousReset = func() {
setprop("/controls/CVR/gndctl", 0); setprop("/controls/CVR/gndctl", 0);
setprop("/controls/CVR/erase", 0); setprop("/controls/CVR/erase", 0);
setprop("/controls/switches/pneumatics/cabin-fans", 1); setprop("/controls/switches/pneumatics/cabin-fans", 1);
setprop("/controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO setprop("/controls/oxygen/crewOxyPB", 0); # 0 = OFF 1 = AUTO
setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
setprop("/controls/switches/emerCall", 0); setprop("/controls/switches/emerCall", 0);
@ -62,8 +62,9 @@ var variousReset = func() {
setprop("/modes/fcu/hdg-time", -45); setprop("/modes/fcu/hdg-time", -45);
setprop("/controls/navigation/switching/att-hdg", 0); setprop("/controls/navigation/switching/att-hdg", 0);
setprop("/controls/navigation/switching/air-data", 0); setprop("/controls/navigation/switching/air-data", 0);
setprop("/controls/switches/no-smoking-sign", 0.5); setprop("/controls/switches/no-smoking-sign", 0.0);
setprop("/controls/switches/seatbelt-sign", 1); setprop("/controls/switches/seatbelt-sign", 0);
setprop("/controls/switches/emer-lights", 0);
} }
var BUTTONS = { var BUTTONS = {

View file

@ -117,15 +117,15 @@ var fplnItem = {
}, },
getAlt: func() { getAlt: func() {
if (me.index == 0 and left(me.wp.wp_name, 4) == fmgc.FMGCInternal.depApt and fmgc.flightPlanController.flightplans[me.plan].departure != nil) { if (me.index == 0 and left(me.wp.wp_name, 4) == fmgc.FMGCInternal.depApt and fmgc.flightPlanController.flightplans[me.plan].departure != nil) {
return [" " ~ sprintf("%5.0f", math.round(fmgc.flightPlanController.flightplans[me.plan].departure.elevation * M2FT)), "grn"]; #fixed - aligned to right return [" " ~ sprintf("%5.0f", math.round(fmgc.flightPlanController.flightplans[me.plan].departure.elevation * M2FT)), "grn"];
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) { } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) {
return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"]; return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"];
} elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { } elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) {
var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed
if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) {
return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol]; #fixed - aligned to right return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol];
} else { } else {
return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; #fixed - aligned to right return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol];
} }
} else { } else {
return ["------", "wht"]; return ["------", "wht"];

View file

@ -238,6 +238,7 @@ var initInputA = func(key, i) {
fmgc.flightPlanController.reset(2); fmgc.flightPlanController.reset(2);
fmgc.flightPlanController.init(); fmgc.flightPlanController.init();
Simbrief.SimbriefParser.inhibit = 0; Simbrief.SimbriefParser.inhibit = 0;
fmgc.updateARPT();
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].empty();
#} else if (scratchpad == "") { #} else if (scratchpad == "") {
#fmgc.FMGCInternal.altSelected = 0; #fmgc.FMGCInternal.altSelected = 0;
@ -264,6 +265,7 @@ var initInputA = func(key, i) {
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].empty();
fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2);
fmgc.FMGCInternal.altSelected = 0; fmgc.FMGCInternal.altSelected = 0;
fmgc.updateARPT();
fmgc.updateArptLatLon(); fmgc.updateArptLatLon();
#setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION");
} else { } else {

View file

@ -636,6 +636,8 @@ var lskbutton = func(btn, i) {
mcdu_scratchpad.scratchpads[i].empty(); mcdu_scratchpad.scratchpads[i].empty();
} }
} }
} else if (page == "VERTREV") {
canvas_mcdu.myVertRev[i].pushButtonLeft(3);
} else if (page == "MCDUTEXT") { } else if (page == "MCDUTEXT") {
atsu.freeTexts[i].selection = 2; atsu.freeTexts[i].selection = 2;
atsu.freeTexts[i].changed = 1; atsu.freeTexts[i].changed = 1;
@ -1085,6 +1087,8 @@ var rskbutton = func(btn, i) {
atsu.freeTexts[i].changed = 1; atsu.freeTexts[i].changed = 1;
} else if (page == "ATCMENU") { } else if (page == "ATCMENU") {
pageNode[i].setValue("MCDUTEXT"); pageNode[i].setValue("MCDUTEXT");
} else if (page == "VERTREV") {
canvas_mcdu.myVertRev[i].pushButtonRight(3);
} else { } else {
mcdu_message(i, "NOT ALLOWED"); mcdu_message(i, "NOT ALLOWED");
} }

View file

@ -1,3 +1,5 @@
var scratchpadStore = nil;
var vertRev = { var vertRev = {
title: [nil, nil, nil], title: [nil, nil, nil],
subtitle: [nil, nil], subtitle: [nil, nil],
@ -42,6 +44,28 @@ var vertRev = {
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} }
}, },
getSpd: func() {
if (me.wp.speed_cstr != nil and me.wp.speed_cstr > 0) {
var tcol = (me.wp.speed_cstr_type == "computed" or me.wp.speed_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed
return [" " ~ sprintf("%3.0f", me.wp.speed_cstr), tcol];
} else {
return [nil,nil];
}
},
getAlt: func() {
if (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) {
var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed
if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) {
return [sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)) ~ " ", tcol];
} else {
return [sprintf("%5.0f", me.wp.alt_cstr) ~ " ", tcol];
}
} else {
return [nil,nil];
}
},
alt: nil,
speed: nil,
_setupPageWithData: func() { _setupPageWithData: func() {
if (me.type == 3) { if (me.type == 3) {
me.title = ["VERT REV", " AT ", "PPOS"]; me.title = ["VERT REV", " AT ", "PPOS"];
@ -57,15 +81,30 @@ var vertRev = {
me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]];
} elsif (me.type == 2) { } elsif (me.type == 2) {
me.title = ["VERT REV", " AT ", me.id]; 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.L1 = ["", " EFOB ---.-", "wht"];
me.R1 = ["", "EXTRA ---.- ", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"];
me.L2 = ["250/10000", " CLB SPD LIM", "mag"]; me.L2 = ["250/10000", " CLB SPD LIM", "mag"];
me.L3 = [" [ ]", " SPD CSTR", "blu"]; me.speed = me.getSpd();
if (me.speed[0] == nil) {
me.L3 = [" [ ]", " SPD CSTR", "blu"];
me.fontMatrix[0][2] = 1;
} else {
me.L3 = [me.speed[0], " SPD CSTR", me.speed[1]];
me.fontMatrix[0][2] = 0;
}
me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L4 = [" CONSTANT MACH", nil, "wht"];
me.L5 = [" WIND DATA", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"];
me.L6 = [" CLB", nil, "amb"]; me.L6 = [" CLB", nil, "amb"];
me.R2 = ["RTA ", nil, "wht"]; me.R2 = ["RTA ", nil, "wht"];
me.R3 = ["[ ] ", "ALT CSTR ", "blu"]; me.alt = me.getAlt();
if (me.alt[0] == nil) {
me.R3 = ["[ ] ", "ALT CSTR ", "blu"];
me.fontMatrix[1][2] = 1;
} else {
me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]];
me.fontMatrix[1][2] = 0;
}
me.R6 = ["DES ", nil, "amb"]; 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. # 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.
# The CLB or DES prompts should only be shown for a vertical revision in the cruise phase. # The CLB or DES prompts should only be shown for a vertical revision in the cruise phase.
@ -74,7 +113,6 @@ var vertRev = {
# The 'arrows' for CLB/DES should actually be asterisks. # The 'arrows' for CLB/DES should actually be asterisks.
me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 1]]; me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 1]];
me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "amb"], ["ack", "wht", "ack", "ack", "wht", "amb"]]; me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "amb"], ["ack", "wht", "ack", "ack", "wht", "amb"]];
me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]];
} else { } else {
me.title = ["VERT REV", " AT ", me.id]; me.title = ["VERT REV", " AT ", me.id];
@ -135,8 +173,22 @@ var vertRev = {
} }
}, },
pushButtonLeft: func(index) { pushButtonLeft: func(index) {
if (index == 5) { scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad;
#print("role: ", me.wp.wp_role, ", type: ", me.wp.wp_type); if (index == 3 and me.type == 2) {
if (scratchpadStore == "CLR") {
me.wp.setSpeed("delete");
mcdu_scratchpad.scratchpads[me.computer].empty();
me._setupPageWithData();
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3 and scratchpadStore >= 100 and scratchpadStore <= 350) {
me.wp.setSpeed(scratchpadStore, "at");
mcdu_scratchpad.scratchpads[me.computer].empty();
me._setupPageWithData();
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
mcdu_message(me.computer, "FORMAT ERROR");
}
} elsif (index == 5) {
if (me.wp.wp_role == "sid") { if (me.wp.wp_role == "sid") {
if (canvas_mcdu.myCLBWIND[me.computer] == nil) { if (canvas_mcdu.myCLBWIND[me.computer] == nil) {
canvas_mcdu.myCLBWIND[me.computer] = windCLBPage.new(me.computer); canvas_mcdu.myCLBWIND[me.computer] = windCLBPage.new(me.computer);
@ -182,6 +234,24 @@ var vertRev = {
mcdu_message(me.computer, "NOT ALLOWED"); mcdu_message(me.computer, "NOT ALLOWED");
} }
}, },
pushButtonRight: func(index) {
scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad;
if (index == 3 and me.type == 2) {
if (scratchpadStore == "CLR") {
me.wp.setAltitude("delete");
mcdu_scratchpad.scratchpads[me.computer].empty();
me._setupPageWithData();
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} elsif (num(scratchpadStore) != nil and (size(scratchpadStore) == 4 or size(scratchpadStore) == 5) and scratchpadStore >= 0 and scratchpadStore <= 39000) {
me.wp.setAltitude(math.round(scratchpadStore, 10), "at");
mcdu_scratchpad.scratchpads[me.computer].empty();
me._setupPageWithData();
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} else {
mcdu_message(me.computer, "FORMAT ERROR");
}
}
},
}; };
var updateCrzLvlCallback = func () { var updateCrzLvlCallback = func () {

View file

@ -1,5 +1,5 @@
# #
# Chrono - Clock - ET # Chrono - Clock - ET
# #
var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1); var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1);
var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1); var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1);
@ -52,7 +52,6 @@ var chrono = {
#Cpt chrono #Cpt chrono
var cpt_chrono = { var cpt_chrono = {
#elapsetime_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/chrono/elapsetime-sec", 0, "INT"),
etHh_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etHh_cpt", 0, "INT"), etHh_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etHh_cpt", 0, "INT"),
etMin_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etMin_cpt", 0, "INT"), etMin_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etMin_cpt", 0, "INT"),
etSec_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etSec_cpt", 0, "INT"), etSec_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etSec_cpt", 0, "INT"),
@ -61,7 +60,6 @@ var cpt_chrono = {
#Fo chrono #Fo chrono
var fo_chrono = { var fo_chrono = {
#elapsetime_fo: props.globals.initNode("/instrumentation/ndchrono[1]/elapsetime-sec", 0, "INT"),
etHh_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etHh_fo", 0, "INT"), etHh_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etHh_fo", 0, "INT"),
etMin_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etMin_fo", 0, "INT"), etMin_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etMin_fo", 0, "INT"),
etSec_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etSec_fo", 0, "INT"), etSec_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etSec_fo", 0, "INT"),
@ -141,6 +139,31 @@ setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){
}; };
}, 0, 0); }, 0, 0);
#Chrono
setlistener("instrumentation/efis[0]/inputs/CHRONO", func(et){
chrono0 = et.getValue();
if (chrono0 == 1){
chrono_cpt.start();
} elsif (chrono0 == 2) {
chrono_cpt.stop();
} elsif (chrono0 == 0) {
chrono_cpt.reset();
setprop("instrumentation/ndchrono[0]/elapsetime-sec", 0);
}
}, 0, 0);
setlistener("instrumentation/efis[1]/inputs/CHRONO", func(et){
chrono1 = et.getValue();
if (chrono1 == 1){
chrono_fo.start();
} elsif (chrono1 == 2) {
chrono_fo.stop();
} elsif (chrono1 == 0) {
chrono_fo.reset();
setprop("instrumentation/ndchrono[1]/elapsetime-sec", 0);
}
}, 0, 0);
setlistener("instrumentation/clock/et-selector", func(et){ setlistener("instrumentation/clock/et-selector", func(et){
tmp1 = et.getValue(); tmp1 = et.getValue();
if (tmp1 == 2){ if (tmp1 == 2){
@ -271,6 +294,7 @@ var start_loop = maketimer(0.1, func {
item.update(nil); item.update(nil);
} }
} }
#Cpt Chrono #Cpt Chrono
chr0_tmp = getprop("instrumentation/ndchrono[0]/elapsetime-sec"); chr0_tmp = getprop("instrumentation/ndchrono[0]/elapsetime-sec");
if (chr0_tmp >= 360000) { if (chr0_tmp >= 360000) {

View file

@ -914,7 +914,7 @@
</clipto> </clipto>
</pure_gain> </pure_gain>
<pure_gain name="/instrumentation/radar-altimeter[1]/radar-altitude-ft"> <pure_gain name="/instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected">
<input>/instrumentation/radar-altimeter[1]/radar-altitude-ft</input> <input>/instrumentation/radar-altimeter[1]/radar-altitude-ft</input>
<gain>1</gain> <gain>1</gain>
<clipto> <clipto>

View file

@ -633,9 +633,9 @@
/systems/fuel/quantity/center-low eq 1 /systems/fuel/quantity/center-low eq 1
/systems/fuel/feed-center-2 eq 0 /systems/fuel/feed-center-2 eq 0
</test> </test>
/systems/fuel/feed-left-inner eq 0
/systems/fuel/feed-right-inner eq 1 /systems/fuel/feed-right-inner eq 1
/systems/fuel/valves/crossfeed-valve eq 1 /systems/fuel/valves/crossfeed-valve eq 1
/consumables/fuel/tank[1]/level-gal_us le /consumables/fuel/tank[3]/unusable-gal_us
/consumables/fuel/tank[3]/level-gal_us gt /consumables/fuel/tank[3]/unusable-gal_us /consumables/fuel/tank[3]/level-gal_us gt /consumables/fuel/tank[3]/unusable-gal_us
propulsion/tank[5]/contents-lbs lt 9 propulsion/tank[5]/contents-lbs lt 9
</test> </test>
@ -649,9 +649,9 @@
/systems/fuel/feed-center-1 eq 0 /systems/fuel/feed-center-1 eq 0
</test> </test>
/systems/fuel/feed-left-inner eq 1 /systems/fuel/feed-left-inner eq 1
/systems/fuel/feed-right-inner eq 0
/systems/fuel/valves/crossfeed-valve eq 1 /systems/fuel/valves/crossfeed-valve eq 1
/consumables/fuel/tank[1]/level-gal_us gt /consumables/fuel/tank[1]/unusable-gal_us /consumables/fuel/tank[1]/level-gal_us gt /consumables/fuel/tank[1]/unusable-gal_us
/consumables/fuel/tank[3]/level-gal_us le /consumables/fuel/tank[3]/unusable-gal_us
propulsion/tank[6]/contents-lbs lt 9 propulsion/tank[6]/contents-lbs lt 9
</test> </test>
</switch> </switch>

View file

@ -2206,8 +2206,8 @@
<switch name="/ECAM/warnings/logic/stall/stall-warn-inhibit"> <switch name="/ECAM/warnings/logic/stall/stall-warn-inhibit">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500 /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 1500
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500 /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 1500
/it-fbw/law eq 0 /it-fbw/law eq 0
/ECAM/warnings/logic/stall/phase-flipflop eq 1 /ECAM/warnings/logic/stall/phase-flipflop eq 1
</test> </test>
@ -3016,8 +3016,8 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
<test logic="OR"> <test logic="OR">
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750
</test> </test>
/ECAM/phases/phase-calculation/takeoff-power eq 0 /ECAM/phases/phase-calculation/takeoff-power eq 0
<test logic="OR"> <test logic="OR">
@ -3052,8 +3052,8 @@
</test> </test>
</test> </test>
<test logic="OR"> <test logic="OR">
/instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750
/instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750
</test> </test>
/ECAM/phases/phase-calculation/takeoff-power eq 0 /ECAM/phases/phase-calculation/takeoff-power eq 0
<test logic="OR"> <test logic="OR">