From 2bb5ec6578459961a77a41df5ecdb3f4f4af2203 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Thu, 26 Nov 2020 17:49:21 +0000 Subject: [PATCH] MAN PITCH TRIM is controlled now by elevator fault. --- Models/Instruments/PFD/PFD.nas | 52 ++++++++++++++-------------------- Nasal/FBW/it-fbw.nas | 17 +++-------- 2 files changed, 26 insertions(+), 43 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index d8193e65..24d86731 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -512,21 +512,19 @@ var canvas_PFD_base = { me["FMA_rollarm_box"].hide(); me["FMA_Middle1"].hide(); me["FMA_Middle2"].hide(); - if (wow1.getValue() == 0) { - if (fbw_curlaw == 2) { - me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); - me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); - me["FMA_ctr_msg"].show(); - } else if (fbw_curlaw == 3) { - me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY"); - me["FMA_ctr_msg"].setColor(1,0,0); - me["FMA_ctr_msg"].show(); - } else { - me["FMA_ctr_msg"].hide(); - } + + if (fbw_curlaw == 2 and wow1.getValue() == 0) { + me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); + me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); + me["FMA_ctr_msg"].show(); + } else if (fbw_curlaw == 3) { + me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY"); + me["FMA_ctr_msg"].setColor(1,0,0); + me["FMA_ctr_msg"].show(); } else { me["FMA_ctr_msg"].hide(); } + me["FMA_combined"].show(); if (pitch_box.getValue() == 1 and pitch_mode_act != " ") { me["FMA_combined_box"].show(); @@ -536,24 +534,18 @@ var canvas_PFD_base = { } else { me["FMA_combined"].hide(); me["FMA_combined_box"].hide(); - if (wow1.getValue() == 0) { - if (fbw_curlaw == 2) { - me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); - me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); - me["FMA_Middle1"].hide(); - me["FMA_Middle2"].show(); - me["FMA_ctr_msg"].show(); - } else if (fbw_curlaw == 3) { - me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY"); - me["FMA_ctr_msg"].setColor(1,0,0); - me["FMA_Middle1"].hide(); - me["FMA_Middle2"].show(); - me["FMA_ctr_msg"].show(); - } else { - me["FMA_ctr_msg"].hide(); - me["FMA_Middle1"].show(); - me["FMA_Middle2"].hide(); - } + if (fbw_curlaw == 2 and wow1.getValue() == 0) { + me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM"); + me["FMA_ctr_msg"].setColor(0.7333,0.3803,0); + me["FMA_Middle1"].hide(); + me["FMA_Middle2"].show(); + me["FMA_ctr_msg"].show(); + } else if (fbw_curlaw == 3) { + me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY"); + me["FMA_ctr_msg"].setColor(1,0,0); + me["FMA_Middle1"].hide(); + me["FMA_Middle2"].show(); + me["FMA_ctr_msg"].show(); } else { me["FMA_ctr_msg"].hide(); me["FMA_Middle1"].show(); diff --git a/Nasal/FBW/it-fbw.nas b/Nasal/FBW/it-fbw.nas index c150d965..ab6fe620 100644 --- a/Nasal/FBW/it-fbw.nas +++ b/Nasal/FBW/it-fbw.nas @@ -193,7 +193,10 @@ var update_loop = func { tripleIRFail = !ir1 and !ir2 and !ir3; doubleIRFail = (!ir1 and !ir2 and ir3) or (ir1 and !ir2 and !ir3) or (!ir1 and ir2 and !ir3); - if (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) { + if (dualELACFault and !sec1 and !sec2) { + FBW.degradeLaw.setValue(3); + FBW.apOff = 1; + } elsif (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) { if (dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or (systems.ELEC.EmerElec.getBoolValue() and !fac1) or tripleIRFail) { if (lawyaw == 0 or lawyaw == 1) { FBW.degradeYawLaw.setValue(2); @@ -218,12 +221,6 @@ var update_loop = func { FBW.degradeLaw.setValue(0); FBW.apOff = 0; } - - if (dualELACFault and tripleSECFault and dualFACFault) { - FBW.degradeLaw.setValue(3); - FBW.apOff = 1; - } - # degrade loop runs faster; reset this variable law = FBW.activeLaw.getValue(); @@ -240,12 +237,6 @@ var update_loop = func { } } - # If they can, laws can go back to standard law - if (law == 3) { - if (!dualELACFault or !tripleSECFault or !dualFACFault) { - FBW.degradeLaw.setValue(2); - } - } cas = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue(); mmoIAS = (cas / pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue()) * 0.82;