diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 0e67a4e6..ee17ff7a 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -81,6 +81,8 @@ setprop("/systems/acconfig/spinning", 0); setprop("/systems/acconfig/spin", "-"); setprop("/systems/acconfig/new-revision", ""); setprop("/systems/acconfig/out-of-date", 0); +setprop("/systems/acconfig/mismatch-code", "0x000"); +setprop("/systems/acconfig/mismatch-reason", "XX"); var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/IDG-A32X/AircraftConfig/main.xml"); var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/IDG-A32X/AircraftConfig/welcome.xml"); var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/IDG-A32X/AircraftConfig/psload.xml"); @@ -91,6 +93,7 @@ var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/ID var fail_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fail/dialog", "Aircraft/IDG-A32X/AircraftConfig/fail.xml"); var about_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/about/dialog", "Aircraft/IDG-A32X/AircraftConfig/about.xml"); var update_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/update/dialog", "Aircraft/IDG-A32X/AircraftConfig/update.xml"); +var error_mismatch = gui.Dialog.new("sim/gui/dialogs/acconfig/error/mismatch/dialog", "Aircraft/IDG-A32X/AircraftConfig/error-mismatch.xml"); spinning.start(); init_dlg.open(); @@ -106,12 +109,25 @@ setlistener("/systems/acconfig/new-revision", func { } }); +var mismatch_chk = func { + if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201731) { + setprop("/systems/acconfig/mismatch-code", "0x121"); + setprop("/systems/acconfig/mismatch-reason", "FGFS version older than 2017.3.1, please update FlightGear"); + if (getprop("/systems/acconfig/out-of-date") != 1) { + error_mismatch.open(); + } + print("Mismatch: 0x121"); + } +} + setlistener("/sim/signals/fdm-initialized", func { init_dlg.close(); if (getprop("/systems/acconfig/out-of-date") == 1) { update_dlg.open(); - print("The A320Family is out of date!"); - } else { + print("System: The IDG-A32X is out of date!"); + } + mismatch_chk(); + if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/mismatch-code") == "0x000") { welcome_dlg.open(); } spinning.stop(); @@ -246,7 +262,6 @@ var beforestart_b = func { setprop("/controls/pneumatic/switches/bleed2", 1); setprop("/controls/pneumatic/switches/pack1", 1); setprop("/controls/pneumatic/switches/pack2", 1); - setprop("/controls/pneumatic/switches/hot-air", 1); setprop("/controls/hydraulic/eng1-pump", 1); setprop("/controls/hydraulic/eng2-pump", 1); setprop("/controls/hydraulic/elec-pump-blue", 1); @@ -322,7 +337,6 @@ var taxi_b = func { setprop("/controls/pneumatic/switches/bleed2", 1); setprop("/controls/pneumatic/switches/pack1", 1); setprop("/controls/pneumatic/switches/pack2", 1); - setprop("/controls/pneumatic/switches/hot-air", 1); setprop("/controls/hydraulic/eng1-pump", 1); setprop("/controls/hydraulic/eng2-pump", 1); setprop("/controls/hydraulic/elec-pump-blue", 1); diff --git a/AircraftConfig/error-mismatch.xml b/AircraftConfig/error-mismatch.xml new file mode 100644 index 00000000..f29a8a2b --- /dev/null +++ b/AircraftConfig/error-mismatch.xml @@ -0,0 +1,138 @@ + + + + + + + + + + aircraft-config-mismatch + vbox + + 0.5 + 0 + 0 + 1 + + + + hbox + + left + + + + + + + + vbox + + + left + + + + left + + + + + + + hbox + left + + + + + + + 1 + + /systems/acconfig/mismatch-code + 1 + + + + + hbox + left + + + + + + + 1 + + /systems/acconfig/mismatch-reason + 1 + + + + + + + left + + + + left + + + + left + + + + + + + + hbox + + + + + + diff --git a/AircraftConfig/update.xml b/AircraftConfig/update.xml index 1175f1e8..e3dae625 100644 --- a/AircraftConfig/update.xml +++ b/AircraftConfig/update.xml @@ -20,100 +20,87 @@ 1 - - hbox - - left - - - + - - - - - - vbox - - - center - - - - center - - - - center - - - - center - - - - - - - - - hbox - - - - + } else { + acconfig.error_mismatch.open(); + } + + + + dialog-close + + + diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 52ccbe22..990efaf0 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -146,13 +146,35 @@ modes/cpt-du-xfr 2 + + /systems/acconfig/mismatch-code + 0x000 + + + Mismatch1 + Aircraft/IDG-A32X/Models/Instruments/PFD/Mismatch.xml + + -0.5807 + -0.51115 + -0.0442 + -15 + + + + /systems/acconfig/mismatch-code + 0x000 + + + + translate PFD1 + Mismatch1 modes/cpt-du-xfr 0.18845 @@ -193,9 +215,27 @@ + + Mismatch2 + Aircraft/IDG-A32X/Models/Instruments/PFD/Mismatch.xml + + -0.5807 + 0.51115 + -0.0442 + -15 + + + + /systems/acconfig/mismatch-code + 0x000 + + + + translate PFD2 + Mismatch2 modes/fo-du-xfr -0.19505 diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 155e5f8f..238dc7d2 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -3588,6 +3588,10 @@ 1 2 + + nasal + + @@ -3600,6 +3604,10 @@ 1 0 + + nasal + + diff --git a/Models/Instruments/OHpanel/res/background.png b/Models/Instruments/OHpanel/res/background.png index a13c84d4..302002ee 100644 Binary files a/Models/Instruments/OHpanel/res/background.png and b/Models/Instruments/OHpanel/res/background.png differ diff --git a/Models/Instruments/OHpanel/res/markings.png b/Models/Instruments/OHpanel/res/markings.png index 0fb1753f..eee1fb61 100644 Binary files a/Models/Instruments/OHpanel/res/markings.png and b/Models/Instruments/OHpanel/res/markings.png differ diff --git a/Models/Instruments/PFD/Mismatch.xml b/Models/Instruments/PFD/Mismatch.xml new file mode 100644 index 00000000..f09b87a9 --- /dev/null +++ b/Models/Instruments/PFD/Mismatch.xml @@ -0,0 +1,13 @@ + + + + + + + res/mismatch.ac + + diff --git a/Models/Instruments/PFD/res/mismatch.ac b/Models/Instruments/PFD/res/mismatch.ac new file mode 100644 index 00000000..2d7c5f21 --- /dev/null +++ b/Models/Instruments/PFD/res/mismatch.ac @@ -0,0 +1,23 @@ +AC3Db +MATERIAL "ac3dmat1" rgb 1 1 1 amb 0 0 0 emis 0.658824 0.670588 0.67451 spec 0 0 0 shi 128 trans 0 +OBJECT world +kids 1 +OBJECT poly +name "rect" +loc 0.0643506 0 0 +texture "mismatch.png" +crease 45.000000 +numvert 4 +-0.0639733 0.0784821 -0.0784821 +-0.0639733 0.0784821 0.0784821 +-0.0639733 -0.0784821 0.0784821 +-0.0639733 -0.0784821 -0.0784821 +numsurf 1 +SURF 0x30 +mat 0 +refs 4 +0 1 1 +1 0 1 +2 0 0 +3 1 0 +kids 0 diff --git a/Models/Instruments/PFD/res/mismatch.png b/Models/Instruments/PFD/res/mismatch.png new file mode 100644 index 00000000..7db0bdb9 Binary files /dev/null and b/Models/Instruments/PFD/res/mismatch.png differ diff --git a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas index 92aeabf9..f568d482 100644 --- a/Models/Instruments/Upper-ECAM/Upper-ECAM.nas +++ b/Models/Instruments/Upper-ECAM/Upper-ECAM.nas @@ -50,7 +50,7 @@ var canvas_upperECAM_base = { return []; }, update: func() { - if (getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) { + if ((getprop("/systems/electrical/bus/ac1") >= 110 or getprop("/systems/electrical/bus/ac2") >= 110) and getprop("/controls/electrical/switches/emer-gen") != 1) { if (getprop("/options/eng") == "CFM" and getprop("/options/EIS2") == 0) { upperECAM_cfm_eis1.page.show(); upperECAM_cfm_eis2.page.hide(); diff --git a/Nasal/FMGC-b.nas b/Nasal/FMGC-b.nas index 11b80653..69044cb8 100644 --- a/Nasal/FMGC-b.nas +++ b/Nasal/FMGC-b.nas @@ -9,6 +9,9 @@ # IT-AUTOFLIGHT Based Autopilot # ################################# +setprop("/it-autoflight/internal/vert-speed-fpm", 0); +setprop("/it-autoflight/internal/heading-5-sec-ahead", 0); + setlistener("/sim/signals/fdm-initialized", func { var trueSpeedKts = getprop("/instrumentation/airspeed-indicator/true-speed-kt"); var locdefl = getprop("/instrumentation/nav[0]/heading-needle-deflection-norm"); diff --git a/Systems/it-fbw.xml b/Systems/it-fbw.xml index 62787682..c5705a63 100644 --- a/Systems/it-fbw.xml +++ b/Systems/it-fbw.xml @@ -19,6 +19,14 @@ false noise-spike + + + + /systems/acconfig/mismatch-code + 0x000 + + + /controls/flight/aileron /controls/flight/aileron-input-fast 5 @@ -27,6 +35,14 @@ false noise-spike + + + + /systems/acconfig/mismatch-code + 0x000 + + + /controls/flight/elevator /controls/flight/elevator-input-fast 5 @@ -35,6 +51,14 @@ false noise-spike + + + + /systems/acconfig/mismatch-code + 0x000 + + + @@ -69,6 +93,14 @@ false noise-spike + + + + /systems/acconfig/mismatch-code + 0x000 + + + diff --git a/revision.txt b/revision.txt index 5303ac12..f083bc3c 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -1509 \ No newline at end of file +1516 \ No newline at end of file