This commit is contained in:
Jonathan Redpath 2017-09-21 11:46:34 +01:00
commit 54765ef337
14 changed files with 352 additions and 94 deletions

View file

@ -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);

View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
#########################################
# Copyright (c) it0uchpods Design Group #
#########################################
-->
<!-- A3XX Aircraft Config Dialog -->
<PropertyList>
<name>aircraft-config-mismatch</name>
<layout>vbox</layout>
<color>
<red>0.5</red>
<green>0</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Error: Mismatch</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>left</halign>
<label>Mismatch usually occurs becuase of a configuration problem, outdated FGFS.</label>
</text>
<text>
<halign>left</halign>
<label>Please try the suggestions below, before contacting it0uchpods Design Group</label>
</text>
<hrule/>
<group>
<layout>hbox</layout>
<halign>left</halign>
<text>
<label>Error Code:</label>
</text>
<text>
<border>1</border>
<label>99999</label>
<property>/systems/acconfig/mismatch-code</property>
<live>1</live>
</text>
</group>
<group>
<layout>hbox</layout>
<halign>left</halign>
<text>
<label>Reason:</label>
</text>
<text>
<border>1</border>
<label>9999999999999999999999999999999999</label>
<property>/systems/acconfig/mismatch-reason</property>
<live>1</live>
</text>
</group>
<hrule/>
<text>
<halign>left</halign>
<label>1) Try downloading the latest version of FGFS with the button below.</label>
</text>
<text>
<halign>left</halign>
<label>2) Confirm that the aircraft is installed correctly.</label>
</text>
<text>
<halign>left</halign>
<label>3) Contact "Wecsje" or "it0uchpods" on the FlightGear Forums.</label>
</text>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<color>
<red>0</red>
<green>0.5</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>center</halign>
<legend>Download Latest FGFS</legend>
<pref-width>220</pref-width>
<binding>
<command>open-browser</command>
<path>https://sourceforge.net/projects/flightgear</path>
</binding>
<binding>
<command>exit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<color>
<red>0</red>
<green>0.5</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>center</halign>
<legend>FlightGear Forums</legend>
<pref-width>220</pref-width>
<binding>
<command>open-browser</command>
<path>http://forum.flightgear.org</path>
</binding>
</button>
</group>
</PropertyList>

View file

@ -20,100 +20,87 @@
<alpha>1</alpha>
</color>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Out of Date!</label>
</text>
<button>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Out of Date!</label>
</text>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Attention: Your IDG-A32X is out of date! This means you are missing out on bugfixes, and new features!</label>
</text>
<text>
<halign>center</halign>
<label>You can continue for now, but it is highly recommended to download the latest version by the button below.</label>
</text>
<text>
<halign>center</halign>
<label>You will need to restart FlightGear, and install the latest .zip file.</label>
</text>
<text>
<halign>center</halign>
<label>GIT users: Please press Remind Me Later, and run a "git pull" command. (or pull using GIT GUI)</label>
</text>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<color>
<red>0</red>
<green>0.5</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>center</halign>
<legend>Download Update</legend>
<pref-width>220</pref-width>
<binding>
<command>open-browser</command>
<path>https://www.github.com/it0uchpods/IDG-A32X/archive/master.zip</path>
</binding>
<binding>
<command>exit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<color>
<red>0.7</red>
<green>0</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>X</legend>
<key>Esc</key>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>vbox</layout>
<text>
<halign>center</halign>
<label>Attention: Your A320Family is out of date! This means you are missing out on bugfixes, and new features!</label>
</text>
<text>
<halign>center</halign>
<label>You can continue for now, but it is highly recommended to download the latest version by the button below.</label>
</text>
<text>
<halign>center</halign>
<label>You will need to restart FlightGear, and install the latest .zip file.</label>
</text>
<text>
<halign>center</halign>
<label>GIT users: Please press Remind Me Later, and run a "git pull" command. (or pull using GIT GUI)</label>
</text>
</group>
<hrule/>
<group>
<layout>hbox</layout>
<button>
<color>
<red>0</red>
<green>0.5</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>center</halign>
<legend>Download Update</legend>
<pref-width>220</pref-width>
<binding>
<command>open-browser</command>
<path>https://www.github.com/it0uchpods/A320Family/archive/master.zip</path>
</binding>
<binding>
<command>exit</command>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
<button>
<color>
<red>0.7</red>
<green>0</green>
<blue>0</blue>
<alpha>1</alpha>
</color>
<halign>center</halign>
<legend>Remind Me Later</legend>
<pref-width>220</pref-width>
<binding>
<command>nasal</command>
<script>
<halign>center</halign>
<legend>Remind Me Later</legend>
<pref-width>220</pref-width>
<binding>
<command>nasal</command>
<script>
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
acconfig.welcome_dlg.open();
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
} else {
acconfig.error_mismatch.open();
}
</script>
</binding>
<binding>
<command>dialog-close</command>
</binding>
</button>
</group>
</PropertyList>

View file

@ -146,13 +146,35 @@
<property>modes/cpt-du-xfr</property>
<value>2</value>
</not-equals>
<equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</equals>
</and>
</condition>
</model>
<model>
<name>Mismatch1</name>
<path>Aircraft/IDG-A32X/Models/Instruments/PFD/Mismatch.xml</path>
<offsets>
<x-m>-0.5807</x-m>
<y-m>-0.51115</y-m>
<z-m>-0.0442</z-m>
<pitch-deg>-15</pitch-deg>
</offsets>
<condition>
<not-equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</not-equals>
</condition>
</model>
<animation>
<type>translate</type>
<object-name>PFD1</object-name>
<object-name>Mismatch1</object-name>
<property>modes/cpt-du-xfr</property>
<factor>0.18845</factor>
<axis>
@ -193,9 +215,27 @@
</condition>
</model>
<model>
<name>Mismatch2</name>
<path>Aircraft/IDG-A32X/Models/Instruments/PFD/Mismatch.xml</path>
<offsets>
<x-m>-0.5807</x-m>
<y-m>0.51115</y-m>
<z-m>-0.0442</z-m>
<pitch-deg>-15</pitch-deg>
</offsets>
<condition>
<not-equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</not-equals>
</condition>
</model>
<animation>
<type>translate</type>
<object-name>PFD2</object-name>
<object-name>Mismatch2</object-name>
<property>modes/fo-du-xfr</property>
<factor>-0.19505</factor>
<axis>

View file

@ -3588,6 +3588,10 @@
<value>1</value>
<value>2</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/knb1", 1);</script>
</binding>
</action>
<action>
<button>1</button>
@ -3600,6 +3604,10 @@
<value>1</value>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("/sim/sounde/knb1", 1);</script>
</binding>
</action>
</animation>
<animation>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 190 KiB

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
#########################################
# Copyright (c) it0uchpods Design Group #
#########################################
-->
<PropertyList>
<path>res/mismatch.ac</path>
</PropertyList>

View file

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -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();

View file

@ -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");

View file

@ -19,6 +19,14 @@
<filter>
<debug>false</debug>
<type>noise-spike</type>
<enable>
<condition>
<equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</equals>
</condition>
</enable>
<input>/controls/flight/aileron</input>
<output>/controls/flight/aileron-input-fast</output>
<max-rate-of-change>5</max-rate-of-change>
@ -27,6 +35,14 @@
<filter>
<debug>false</debug>
<type>noise-spike</type>
<enable>
<condition>
<equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</equals>
</condition>
</enable>
<input>/controls/flight/elevator</input>
<output>/controls/flight/elevator-input-fast</output>
<max-rate-of-change>5</max-rate-of-change>
@ -35,6 +51,14 @@
<filter>
<debug>false</debug>
<type>noise-spike</type>
<enable>
<condition>
<equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</equals>
</condition>
</enable>
<input>
<condition>
<or>
@ -69,6 +93,14 @@
<filter>
<debug>false</debug>
<type>noise-spike</type>
<enable>
<condition>
<equals>
<property>/systems/acconfig/mismatch-code</property>
<value>0x000</value>
</equals>
</condition>
</enable>
<input>
<condition>
<and>

View file

@ -1 +1 @@
1509
1516