System: Update ACCONFIG to V1.5.0

This commit is contained in:
Joshua Davidson 2018-05-05 12:48:40 -04:00
parent 7a19594a58
commit 2901d032c4
9 changed files with 80 additions and 16 deletions

View file

@ -731,6 +731,7 @@
<options n="0">
<system n="0">
<keyboard-mode type="bool">0</keyboard-mode>
<laptop-mode type="bool">0</laptop-mode>
</system>
<steep-ils type="bool">0</steep-ils>
<steep-ils-avail type="bool">0</steep-ils-avail>

View file

@ -12,7 +12,6 @@
<name>aircraft-config-about</name>
<layout>vbox</layout>
<pref-width>800</pref-width>
<group>
<layout>hbox</layout>
@ -66,7 +65,7 @@
</text>
<text>
<halign>left</halign>
<label>Pre V1.0, Shared Libraries 1.4.5</label>
<label>Pre V1.0, Shared Libraries 1.5.0</label>
</text>
</group>

View file

@ -87,6 +87,7 @@ setprop("/systems/acconfig/out-of-date", 0);
setprop("/systems/acconfig/mismatch-code", "0x000");
setprop("/systems/acconfig/mismatch-reason", "XX");
setprop("/systems/acconfig/options/keyboard-mode", 0);
setprop("/systems/acconfig/options/laptop-mode", 0);
setprop("/systems/acconfig/options/adirs-skip", 0);
setprop("/systems/acconfig/options/welcome-skip", 0);
setprop("/systems/acconfig/options/pfd-rate", 1);
@ -107,7 +108,7 @@ var update_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/update/dialog", "Aircr
var updated_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/updated/dialog", "Aircraft/IDG-A32X/AircraftConfig/updated.xml");
var error_mismatch = gui.Dialog.new("sim/gui/dialogs/acconfig/error/mismatch/dialog", "Aircraft/IDG-A32X/AircraftConfig/error-mismatch.xml");
var groundservices_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/groundsrvc/dialog", "Aircraft/IDG-A32X/AircraftConfig/groundservices.xml");
var du_framerate = gui.Dialog.new("sim/gui/dialogs/acconfig/du-framerate/dialog", "Aircraft/IDG-A32X/AircraftConfig/du-framerate.xml");
var du_quality = gui.Dialog.new("sim/gui/dialogs/acconfig/du-quality/dialog", "Aircraft/IDG-A32X/AircraftConfig/du-quality.xml");
spinning.start();
init_dlg.open();
@ -127,18 +128,20 @@ setlistener("/systems/acconfig/new-revision", func {
var mismatch_chk = func {
if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201730) {
setprop("/systems/acconfig/mismatch-code", "0x121");
setprop("/systems/acconfig/mismatch-reason", "FGFS version older than 2017.3.0, please update FlightGear.");
setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2017.3.0.");
if (getprop("/systems/acconfig/out-of-date") != 1) {
error_mismatch.open();
}
print("Mismatch: 0x121");
welcome_dlg.close();
} else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 15000) {
setprop("/systems/acconfig/mismatch-code", "0x223");
setprop("/systems/acconfig/mismatch-reason", "The aircraft position is invalid for initialization. Check your scenery.");
setprop("/systems/acconfig/mismatch-reason", "Preposterous configuration detected for initialization. Check your position or scenery.");
if (getprop("/systems/acconfig/out-of-date") != 1) {
error_mismatch.open();
}
print("Mismatch: 0x223");
welcome_dlg.close();
} else if (getprop("/systems/acconfig/libraries-loaded") != 1) {
setprop("/systems/acconfig/mismatch-code", "0x247");
setprop("/systems/acconfig/mismatch-reason", "System files are missing or damaged. Please download a new copy of the aircraft.");
@ -146,6 +149,7 @@ var mismatch_chk = func {
error_mismatch.open();
}
print("Mismatch: 0x247");
welcome_dlg.close();
}
}
@ -170,11 +174,13 @@ setlistener("/sim/signals/fdm-initialized", func {
var readSettings = func {
io.read_properties(getprop("/sim/fg-home") ~ "/Export/IDG-A32X-config.xml", "/systems/acconfig/options");
setprop("/options/system/keyboard-mode", getprop("/systems/acconfig/options/keyboard-mode"));
setprop("/options/system/laptop-mode", getprop("/systems/acconfig/options/laptop-mode"));
setprop("/controls/adirs/skip", getprop("/systems/acconfig/options/adirs-skip"));
}
var writeSettings = func {
setprop("/systems/acconfig/options/keyboard-mode", getprop("/options/system/keyboard-mode"));
setprop("/systems/acconfig/options/laptop-mode", getprop("/options/system/laptop-mode"));
setprop("/systems/acconfig/options/adirs-skip", getprop("/controls/adirs/skip"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/IDG-A32X-config.xml", "/systems/acconfig/options");
}

View file

@ -10,14 +10,14 @@
<PropertyList>
<name>aircraft-config-du-framerate</name>
<name>aircraft-config-du-quality</name>
<layout>vbox</layout>
<group>
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>DU Framerate</label>
<label>DU Quality</label>
</text>
<button>
<halign>right</halign>
@ -49,7 +49,7 @@
<text>
<halign>left</halign>
<label>Here you can adjust the framerate of the Display Units. 1 = Best Quality, 5 = Best Performance</label>
<label>Here you can adjust the quality of the Display Units. 1 = Best Quality, 5 = Best Performance</label>
</text>
<group>

View file

@ -23,7 +23,7 @@
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Error: Mismatch</label>
<label>Something Happened!</label>
</text>
</group>
@ -41,7 +41,7 @@
<text>
<halign>left</halign>
<label>A configuration error or internal error has occurred. The aircraft has been disabled.</label>
<label>Something happened and an internal error has occurred. The aircraft has been disabled.</label>
</text>
<text>
<halign>left</halign>

View file

@ -53,6 +53,11 @@
<label>Keyboard Mode: Maps flight controls to number pad, and number rows, instead of view shortucts.</label>
</text>
<text>
<halign>left</halign>
<label>Laptop Mode: Not implemented yet. When implemented, will allow easier operation on laptops.</label>
</text>
<hrule/>
<text>

View file

@ -17,8 +17,23 @@
<layout>hbox</layout>
<text>
<halign>left</halign>
<label>Aircraft Configuration V1.4.5</label>
<label>Aircraft Configuration V1.5.0</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<row>0</row>
<col>0</col>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>?</legend>
<binding>
<command>nasal</command>
<script>
acconfig.help_dlg.open();
</script>
</binding>
</button>
<button>
<halign>right</halign>
<pref-width>20</pref-width>
@ -66,23 +81,23 @@
</button>
<button>
<halign>center</halign>
<legend>Aircraft Help</legend>
<legend>DU Quality</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.help_dlg.open();
acconfig.du_quality.open();
</script>
</binding>
</button>
<button>
<halign>center</halign>
<legend>DU Framerate</legend>
<legend>About Aircraft</legend>
<pref-width>140</pref-width>
<binding>
<command>nasal</command>
<script>
acconfig.du_framerate.open();
acconfig.about_dlg.open();
</script>
</binding>
</button>
@ -357,6 +372,29 @@
<live>true</live>
</checkbox>
<checkbox>
<label>Laptop Mode (See Aircraft Help)</label>
<halign>left</halign>
<enable>
<property>/systems/acconfig/extra-stuff</property>
</enable>
<property>/options/system/laptop-mode</property>
<binding>
<command>property-toggle</command>
<property>/options/system/laptop-mode</property>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
acconfig.writeSettings();
</script>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>Skip ADIRS Alignment</label>
<halign>left</halign>

View file

@ -19,6 +19,21 @@
<halign>left</halign>
<label>Welcome!</label>
</text>
<empty><stretch>1</stretch></empty>
<button>
<row>0</row>
<col>0</col>
<halign>right</halign>
<pref-width>20</pref-width>
<pref-height>20</pref-height>
<legend>?</legend>
<binding>
<command>nasal</command>
<script>
acconfig.help_dlg.open();
</script>
</binding>
</button>
<button>
<halign>right</halign>
<pref-width>20</pref-width>

View file

@ -1 +1 @@
4407
4408