From f86825a3a2f0293129568df75ac35798a20d9036 Mon Sep 17 00:00:00 2001 From: Joshua Davidson Date: Tue, 4 Jul 2017 23:37:40 -0400 Subject: [PATCH] A3XX: Missing and on OH, SECs, FACs fail spoilers/rudders --- AircraftConfig/fail.xml | 50 -------- Models/Instruments/OHpanel/OHpanel.xml | 162 ++++++++++++++----------- Nasal/it-fbw.nas | 23 ++++ 3 files changed, 113 insertions(+), 122 deletions(-) diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml index b791def4..8e2b7d1c 100644 --- a/AircraftConfig/fail.xml +++ b/AircraftConfig/fail.xml @@ -53,56 +53,6 @@ - - - left - /systems/failures/aileron-left - - dialog-apply - - true - - - - - left - /systems/failures/aileron-right - - dialog-apply - - true - - - - - left - /systems/failures/elevator-left - - dialog-apply - - true - - - - - left - /systems/failures/elevator-right - - dialog-apply - - true - - - - - left - /systems/failures/rudder - - dialog-apply - - true - - left diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 4eeb7719..0246f741 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -883,14 +883,16 @@ ELAC1Btn1F - - /systems/failures/elac1 - 1 - - - /controls/fctl/elac1 - 1 - + + + /systems/failures/elac1 + 1 + + + /controls/fctl/elac1 + 1 + + /controls/switches/annun-test 1 @@ -954,14 +956,16 @@ SEC1Btn1F - - /systems/failures/sec1 - 1 - - - /controls/fctl/sec1 - 1 - + + + /systems/failures/sec1 + 1 + + + /controls/fctl/sec1 + 1 + + /controls/switches/annun-test 1 @@ -1025,14 +1029,16 @@ FAC1Btn1F - - /systems/failures/fac1 - 1 - - - /controls/fctl/fac1 - 1 - + + + /systems/failures/fac1 + 1 + + + /controls/fctl/fac1 + 1 + + /controls/switches/annun-test 1 @@ -1096,14 +1102,16 @@ ELAC2Btn1F - - /systems/failures/elac2 - 1 - - - /controls/fctl/elac2 - 1 - + + + /systems/failures/elac2 + 1 + + + /controls/fctl/elac2 + 1 + + /controls/switches/annun-test 1 @@ -1167,14 +1175,16 @@ SEC2Btn1F - - /systems/failures/sec2 - 1 - - - /controls/fctl/sec2 - 1 - + + + /systems/failures/sec2 + 1 + + + /controls/fctl/sec2 + 1 + + /controls/switches/annun-test 1 @@ -1238,14 +1248,16 @@ SEC3Btn1F - - /systems/failures/sec3 - 1 - - - /controls/fctl/sec3 - 1 - + + + /systems/failures/sec3 + 1 + + + /controls/fctl/sec3 + 1 + + /controls/switches/annun-test 1 @@ -1309,14 +1321,16 @@ FAC2Btn1F - - /systems/failures/fac2 - 1 - - - /controls/fctl/fac2 - 1 - + + + /systems/failures/fac2 + 1 + + + /controls/fctl/fac2 + 1 + + /controls/switches/annun-test 1 @@ -1381,14 +1395,16 @@ GPWSTerrBtn1F - - /instrumentation/mk-viii/serviceable - 0 - - - /instrumentation/mk-viii/inputs/discretes/terr-inhibit - 0 - + + + /instrumentation/mk-viii/serviceable + 0 + + + /instrumentation/mk-viii/inputs/discretes/terr-inhibit + 0 + + /controls/switches/annun-test 1 @@ -1452,14 +1468,16 @@ GPWSBtn1F - - /instrumentation/mk-viii/serviceable - 0 - - - /instrumentation/mk-viii/inputs/discretes/gpws-inhibit - 0 - + + + /instrumentation/mk-viii/serviceable + 0 + + + /instrumentation/mk-viii/inputs/discretes/gpws-inhibit + 0 + + /controls/switches/annun-test 1 diff --git a/Nasal/it-fbw.nas b/Nasal/it-fbw.nas index daa387a2..e471708e 100644 --- a/Nasal/it-fbw.nas +++ b/Nasal/it-fbw.nas @@ -70,32 +70,55 @@ var update_loop = func { if (sec1_sw and !sec1_fail) { setprop("/systems/fctl/sec1", 1); + setprop("/systems/failures/spoiler-l3", 0); + setprop("/systems/failures/spoiler-r3", 0); + setprop("/systems/failures/spoiler-l4", 0); + setprop("/systems/failures/spoiler-r4", 0); } else { setprop("/systems/fctl/sec1", 0); + setprop("/systems/failures/spoiler-l3", 1); + setprop("/systems/failures/spoiler-r3", 1); + setprop("/systems/failures/spoiler-l4", 1); + setprop("/systems/failures/spoiler-r4", 1); } if (sec2_sw and !sec2_fail) { setprop("/systems/fctl/sec2", 1); + setprop("/systems/failures/spoiler-l5", 0); + setprop("/systems/failures/spoiler-r5", 0); } else { setprop("/systems/fctl/sec2", 0); + setprop("/systems/failures/spoiler-l5", 1); + setprop("/systems/failures/spoiler-r5", 1); } if (sec3_sw and !sec3_fail) { setprop("/systems/fctl/sec3", 1); + setprop("/systems/failures/spoiler-l2", 0); + setprop("/systems/failures/spoiler-r2", 0); } else { setprop("/systems/fctl/sec3", 0); + setprop("/systems/failures/spoiler-l2", 1); + setprop("/systems/failures/spoiler-r2", 1); } if (fac1_sw and !fac1_fail) { setprop("/systems/fctl/fac1", 1); + setprop("/systems/failures/rudder", 0); } else { setprop("/systems/fctl/fac1", 0); + if (!fac2_sw or fac2_fail) { + setprop("/systems/failures/rudder", 1); + } } if (fac2_sw and !fac2_fail) { setprop("/systems/fctl/fac2", 1); } else { setprop("/systems/fctl/fac2", 0); + if (!fac1_sw or fac1_fail) { + setprop("/systems/failures/rudder", 1); + } } var elac1 = getprop("/systems/fctl/elac1");