From 171a9296e1feb6f31366d45cdcdcc33522d0403f Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sun, 14 Feb 2021 16:50:50 +0000 Subject: [PATCH 1/8] Simbrief parser: handle no alternate --- Nasal/FMGC/SimbriefParser.nas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas index 087c1f44..9c4b7d21 100644 --- a/Nasal/FMGC/SimbriefParser.nas +++ b/Nasal/FMGC/SimbriefParser.nas @@ -134,12 +134,14 @@ var SimbriefParser = { fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore; } - var alternateID = me.OFP.getNode("alternate/icao_code").getValue(); - var alternates = findAirportsByICAO(alternateID); - if (alternates != nil and size(alternates) != 0) { - fmgc.FMGCInternal.altAirport = alternateID; - atsu.ATISInstances[2].newStation(alternateID); - fmgc.FMGCInternal.altAirportSet = 1; + var alternateID = me.OFP.getNode("alternate/icao_code") == nil ? nil : me.OFP.getNode("alternate/icao_code").getValue(); + if (alternateID != nil) { + var alternates = findAirportsByICAO(alternateID); + if (size(alternates) != 0) { + fmgc.FMGCInternal.altAirport = alternateID; + atsu.ATISInstances[2].newStation(alternateID); + fmgc.FMGCInternal.altAirportSet = 1; + } } var wps = []; From 8ba026397863570c2cc8c62532edc1ed09cad499 Mon Sep 17 00:00:00 2001 From: vezza Date: Sun, 14 Feb 2021 00:29:20 +0100 Subject: [PATCH 2/8] Chrono on ND (both sides) --- Models/FlightDeck/a320.flightdeck.xml | 34 +++++++++++ Models/Instruments/ND/canvas/style.nas | 2 +- Nasal/Panels/clock.nas | 83 +++++++++++++++++++++++++- 3 files changed, 116 insertions(+), 3 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index cbdbc318..ecd70ab5 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -8742,6 +8742,40 @@ + + + pick + chrono_cpt + + + false + + property-cycle + /instrumentation/efis/inputs/CHRONO + 0 + 1 + 2 + + + + + + + pick + chrono_fo + + + false + + property-cycle + /instrumentation/efis[1]/inputs/CHRONO + 0 + 1 + 2 + + + + diff --git a/Models/Instruments/ND/canvas/style.nas b/Models/Instruments/ND/canvas/style.nas index 30c89234..3e6147f2 100644 --- a/Models/Instruments/ND/canvas/style.nas +++ b/Models/Instruments/ND/canvas/style.nas @@ -72,7 +72,7 @@ canvas.NDStyles["Airbus"] = { level_off_alt: "/autopilot/route-manager/vnav/level-off-alt", athr: "/it-autoflight/output/athr", app_mode: "/instrumentation/nd/app-mode", - chrono_node: "/instrumentation/chrono", + chrono_node: "/instrumentation/ndchrono", fpln_offset: "/autopilot/route-manager/offset", active_route_color: [0.0509,0.7529,0.2941], inactive_route_color: [0.95,0.95,0.21] diff --git a/Nasal/Panels/clock.nas b/Nasal/Panels/clock.nas index 558cac2c..30985b60 100644 --- a/Nasal/Panels/clock.nas +++ b/Nasal/Panels/clock.nas @@ -1,8 +1,10 @@ # -# Chrono - Clock - ET +# Chrono - Clock - ET # var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1); var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1); +var chrono_cpt = aircraft.timer.new("instrumentation/ndchrono[0]/elapsetime-sec",1); +var chrono_fo = aircraft.timer.new("instrumentation/ndchrono[1]/elapsetime-sec",1); var chr_min = nil; var chr_sec = nil; @@ -49,6 +51,22 @@ var chrono = { started: props.globals.getNode("/instrumentation/chrono[0]/started"), }; +#Cpt chrono +var cpt_chrono = { + etHh_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etHh_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"), + text: props.globals.initNode("/instrumentation/ndchrono[0]/text", "0' 00''", "STRING"), +}; + +#Fo chrono +var fo_chrono = { + etHh_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etHh_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"), + text: props.globals.initNode("/instrumentation/ndchrono[1]/text", "0' 00''", "STRING"), +}; + var rudderTrim = { rudderTrimDisplay: props.globals.initNode("/controls/flight/rudder-trim-display", 0, "STRING"), rudderTrimDisplayLetter: props.globals.initNode("/controls/flight/rudder-trim-letter-display", "", "STRING"), @@ -59,6 +77,8 @@ setlistener("sim/signals/fdm-initialized", func { chr.reset(); clk.stop(); clk.reset(); + chrono_cpt.reset(); + chrono_fo.reset(); rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue())); start_loop.start(); }); @@ -120,6 +140,31 @@ setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){ }; }, 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){ tmp1 = et.getValue(); if (tmp1 == 2){ @@ -225,6 +270,40 @@ var start_loop = maketimer(0.1, func { item.update(nil); } } + + #Cpt Chrono + chr0_tmp = getprop("instrumentation/ndchrono[0]/elapsetime-sec"); + if (chr0_tmp >= 360000) { + setprop("instrumentation/ndchrono[0]/elapsetime-sec", getprop("instrumentation/ndchrono[0]/elapsetime-sec") - 360000); + }; + chr0_hh = int(chr0_tmp * 0.000277777777778); + chr0_min = int((chr0_tmp * 0.0166666666667) - (chr0_hh * 60)); + chr0_sec = int(chr0_tmp - (chr0_min * 60) - (chr0_hh * 3600)); + setprop("instrumentation/ndchrono[0]/etHh_cpt", chr0_hh); + setprop("instrumentation/ndchrono[0]/etMin_cpt", chr0_min); + setprop("instrumentation/ndchrono[0]/etSec_cpt", chr0_sec); + if (chr0_tmp >= 3600) { + setprop("instrumentation/ndchrono[0]/text", sprintf("%02d H %02d'", chr0_hh, chr0_min)); + } else { + setprop("instrumentation/ndchrono[0]/text", sprintf("%02d' %02d''", chr0_min, chr0_sec)); + } + + #Fo Chrono + chr1_tmp = getprop("instrumentation/ndchrono[1]/elapsetime-sec"); + if (chr1_tmp >= 360000) { + setprop("instrumentation/ndchrono[1]/elapsetime-sec", getprop("instrumentation/ndchrono[1]/elapsetime-sec") - 360000); + }; + chr1_hh = int(chr1_tmp * 0.000277777777778); + chr1_min = int(chr1_tmp * 0.0166666666667); + chr1_sec = int(chr1_tmp - (chr1_min * 60) - (chr1_hh * 3600)); + setprop("instrumentation/ndchrono[1]/etHh_fo", chr1_hh); + setprop("instrumentation/ndchrono[1]/etMin_fo", chr1_min); + setprop("instrumentation/ndchrono[1]/etSec_fo", chr1_sec); + if (chr1_tmp >= 3600) { + setprop("instrumentation/ndchrono[1]/text", sprintf("%02d H %02d'", chr1_hh, chr1_min)); + } else { + setprop("instrumentation/ndchrono[1]/text", sprintf("%02d' %02d''", chr1_min, chr1_sec)); + } }); var updateRudderTrim = func() { @@ -255,4 +334,4 @@ var update_items = [ ), ]; -setlistener("/controls/switches/annun-test", updateRudderTrim, 0, 0); \ No newline at end of file +setlistener("/controls/switches/annun-test", updateRudderTrim, 0, 0); From 341e8558ab94939f49f976325b66964240bcbd2d Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Mon, 15 Feb 2021 17:45:54 +0000 Subject: [PATCH 3/8] VERT REV: add ability to change altitude constraints and speed constraints on the page --- Models/Instruments/MCDU/MCDU.nas | 2 + Nasal/MCDU/F-PLN.nas | 6 +-- Nasal/MCDU/MCDU.nas | 4 ++ Nasal/MCDU/VERTREV.nas | 80 ++++++++++++++++++++++++++++++-- 4 files changed, 84 insertions(+), 8 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 796aeb5b..39e237e3 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5188,6 +5188,8 @@ var canvas_MCDU_base = { 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.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]); diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index f3cab9a5..65c2348c 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -117,15 +117,15 @@ var fplnItem = { }, getAlt: func() { 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) { return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"]; } 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 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 { - return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; #fixed - aligned to right + return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; } } else { return ["------", "wht"]; diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 975237a3..592f6f26 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -636,6 +636,8 @@ var lskbutton = func(btn, i) { mcdu_scratchpad.scratchpads[i].empty(); } } + } else if (page == "VERTREV") { + canvas_mcdu.myVertRev[i].pushButtonLeft(3); } else if (page == "MCDUTEXT") { atsu.freeTexts[i].selection = 2; atsu.freeTexts[i].changed = 1; @@ -1085,6 +1087,8 @@ var rskbutton = func(btn, i) { atsu.freeTexts[i].changed = 1; } else if (page == "ATCMENU") { pageNode[i].setValue("MCDUTEXT"); + } else if (page == "VERTREV") { + canvas_mcdu.myVertRev[i].pushButtonRight(3); } else { mcdu_message(i, "NOT ALLOWED"); } diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index 05513585..e3ced48d 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -1,3 +1,5 @@ +var scratchpadStore = nil; + var vertRev = { title: [nil, nil, nil], subtitle: [nil, nil], @@ -42,6 +44,28 @@ var vertRev = { 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() { if (me.type == 3) { 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]]; } 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 = ["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.L5 = [" WIND DATA", nil, "wht"]; me.L6 = [" CLB", nil, "amb"]; 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"]; # 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. @@ -74,7 +113,6 @@ var vertRev = { # The 'arrows' for CLB/DES should actually be asterisks. 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.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; } else { me.title = ["VERT REV", " AT ", me.id]; @@ -135,8 +173,22 @@ var vertRev = { } }, pushButtonLeft: func(index) { - if (index == 5) { - #print("role: ", me.wp.wp_role, ", type: ", me.wp.wp_type); + scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad; + 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 (canvas_mcdu.myCLBWIND[me.computer] == nil) { canvas_mcdu.myCLBWIND[me.computer] = windCLBPage.new(me.computer); @@ -182,6 +234,24 @@ var vertRev = { 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 () { From 82521c8e7674aee22612fa4cc822db4683595d4e Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 19 Feb 2021 19:27:27 +0000 Subject: [PATCH 4/8] Aircraft Config: call resetVarious(). SOP: seatbelts and crew oxy to off --- AircraftConfig/acconfig.nas | 3 +++ Nasal/Libraries/buttons.nas | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 68204794..8c5b4a51 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -298,6 +298,7 @@ var colddark = func { setprop("/controls/lighting/overhead-panel-knb", 0); atc.transponderPanel.modeSwitch(1); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); if (getprop("/engines/engine[1]/n2-actual") < 2) { colddark_b(); @@ -343,6 +344,7 @@ var beforestart = func { setprop("/controls/gear/gear-down", 1); setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); # Now the Startup! @@ -434,6 +436,7 @@ var taxi = func { setprop("/controls/gear/gear-down", 1); setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); # Now the Startup! diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index 289abfb2..a6e10250 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -32,7 +32,7 @@ var variousReset = func() { setprop("/controls/CVR/gndctl", 0); setprop("/controls/CVR/erase", 0); 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/emerCallLtC", 0); # CALL light, flashes amber for 10s setprop("/controls/switches/emerCall", 0); @@ -63,7 +63,7 @@ var variousReset = func() { setprop("/controls/navigation/switching/att-hdg", 0); setprop("/controls/navigation/switching/air-data", 0); setprop("/controls/switches/no-smoking-sign", 0.5); - setprop("/controls/switches/seatbelt-sign", 1); + setprop("/controls/switches/seatbelt-sign", 0); } var BUTTONS = { From 06e81b20300e5da3d5a93cc4c0de83ccaac1b9f9 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 19 Feb 2021 19:42:56 +0000 Subject: [PATCH 5/8] SOP: seatbelt, smoking, emer lts to off --- A320-main.xml | 2 +- AircraftConfig/acconfig.nas | 6 ++++++ Models/Instruments/MCDU/MCDU.nas | 5 ++--- Nasal/Libraries/buttons.nas | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index cdd1862b..b39ecc9d 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -930,7 +930,7 @@ 0 - 0 + 1 0 0 1 diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 8c5b4a51..e963ddc1 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -402,6 +402,9 @@ var beforestart_b = func { setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/switches/beacon", 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[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); @@ -495,6 +498,9 @@ var taxi_b = func { setprop("/controls/switches/beacon", 1); setprop("/controls/switches/wing-lights", 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[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 39e237e3..1142c943 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -151,7 +151,6 @@ var baro = props.globals.getNode("/FMGC/internal/baro", 1); # GA PERF # 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 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 @@ -844,8 +843,8 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - me["Simple_R1S"].setText(sprintf("%-10s",(parking_brake.getValue() == 1) ? "SET" : "RELEASED")); - me["Simple_R1"].setText(sprintf("%-10s",(gear0_wow.getValue() == 1) ? "GROUND" : "FLIGHT")); + me["Simple_R1S"].setText(sprintf("%-10s",(pts.Controls.Gear.parkingBrake.getValue() == 1) ? "SET" : "RELEASED")); + 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_R2"].setText(sprintf("%-10s",(doorR1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R3S"].setText(sprintf("%-10s",(doorL4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index a6e10250..24dbb3a6 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -62,8 +62,9 @@ var variousReset = func() { setprop("/modes/fcu/hdg-time", -45); setprop("/controls/navigation/switching/att-hdg", 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", 0); + setprop("/controls/switches/emer-lights", 0); } var BUTTONS = { From 05f5774fd2f747f74fc2501058da600a8c036cf3 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 19 Feb 2021 20:17:38 +0000 Subject: [PATCH 6/8] Fix that some code was not called with FROM / TO --- Nasal/MCDU/INITA.nas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index e96f0df2..9d048ea0 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -238,6 +238,7 @@ var initInputA = func(key, i) { fmgc.flightPlanController.reset(2); fmgc.flightPlanController.init(); Simbrief.SimbriefParser.inhibit = 0; + fmgc.updateARPT(); mcdu_scratchpad.scratchpads[i].empty(); #} else if (scratchpad == "") { #fmgc.FMGCInternal.altSelected = 0; @@ -264,6 +265,7 @@ var initInputA = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; + fmgc.updateARPT(); fmgc.updateArptLatLon(); #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else { From 1167faa6a8229ffe91b463477449d1c802504b12 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 25 Feb 2021 20:29:12 +0000 Subject: [PATCH 7/8] Fuel system: fix crossfeed with pumps on --- Systems/a320-fuel.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Systems/a320-fuel.xml b/Systems/a320-fuel.xml index 76648294..9267dd76 100644 --- a/Systems/a320-fuel.xml +++ b/Systems/a320-fuel.xml @@ -632,9 +632,9 @@ /systems/fuel/quantity/center-low eq 1 /systems/fuel/feed-center-2 eq 0 - /systems/fuel/feed-left-inner eq 0 /systems/fuel/feed-right-inner 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 propulsion/tank[5]/contents-lbs lt 9 @@ -648,9 +648,9 @@ /systems/fuel/feed-center-1 eq 0 /systems/fuel/feed-left-inner eq 1 - /systems/fuel/feed-right-inner eq 0 /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[3]/level-gal_us le /consumables/fuel/tank[3]/unusable-gal_us propulsion/tank[6]/contents-lbs lt 9 From e9b0938fd37f226ea3f7e963ac2d827dbaea7d44 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Sat, 27 Feb 2021 12:32:55 +0000 Subject: [PATCH 8/8] Radar altimeter: bugfix. Should use -corrected for all. --- A320-main.xml | 6 ++++-- Systems/a320-adr.xml | 2 +- Systems/a320-fwc.xml | 12 ++++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index b39ecc9d..4b9cb26b 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1841,8 +1841,9 @@ 30 10 30 - 1219 + 1525 true + 0 @@ -1855,8 +1856,9 @@ 30 10 30 - 1219 + 1525 true + 0 diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml index 8e6ce63f..2a125dcf 100644 --- a/Systems/a320-adr.xml +++ b/Systems/a320-adr.xml @@ -914,7 +914,7 @@ - + /instrumentation/radar-altimeter[1]/radar-altitude-ft 1 diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index c683e0e0..1c08f6c3 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2205,8 +2205,8 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 1500 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 1500 /it-fbw/law eq 0 /ECAM/warnings/logic/stall/phase-flipflop eq 1 @@ -3015,8 +3015,8 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750 /ECAM/phases/phase-calculation/takeoff-power eq 0 @@ -3051,8 +3051,8 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750 /ECAM/phases/phase-calculation/takeoff-power eq 0