Merge branch 'master' into nws-force
This commit is contained in:
commit
3a6a0f2eee
8 changed files with 346 additions and 173 deletions
|
@ -61,7 +61,7 @@
|
|||
</text>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Pre V1.0, Shared Libraries 1.5.0</label>
|
||||
<label>Pre V1.0, Shared Libraries 1.5.1</label>
|
||||
</text>
|
||||
|
||||
</group>
|
||||
|
|
|
@ -88,6 +88,7 @@ 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/no-rendering-warn", 0);
|
||||
setprop("/systems/acconfig/options/pfd-rate", 1);
|
||||
setprop("/systems/acconfig/options/nd-rate", 1);
|
||||
setprop("/systems/acconfig/options/uecam-rate", 1);
|
||||
|
@ -108,6 +109,7 @@ var error_mismatch = gui.Dialog.new("sim/gui/dialogs/acconfig/error/mismatch/dia
|
|||
var groundservices_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/groundsrvc/dialog", "Aircraft/IDG-A32X/AircraftConfig/groundservices.xml");
|
||||
var du_quality = gui.Dialog.new("sim/gui/dialogs/acconfig/du-quality/dialog", "Aircraft/IDG-A32X/AircraftConfig/du-quality.xml");
|
||||
var autopush_dlg = gui.Dialog.new("sim/gui/dialogs/autopush/dialog", "Aircraft/IDG-A32X/AircraftConfig/autopush.xml");
|
||||
var rendering_dlg = gui.Dialog.new("sim/gui/dialogs/rendering/dialog", "Aircraft/IDG-A32X/AircraftConfig/rendering.xml");
|
||||
spinning.start();
|
||||
init_dlg.open();
|
||||
|
||||
|
@ -132,6 +134,7 @@ var mismatch_chk = func {
|
|||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
||||
error_mismatch.open();
|
||||
}
|
||||
libraries.systemsLoop.stop();
|
||||
print("Mismatch: 0x121");
|
||||
welcome_dlg.close();
|
||||
} else if (getprop("/gear/gear[0]/wow") == 0 or getprop("/position/altitude-ft") >= 15000) {
|
||||
|
@ -140,6 +143,7 @@ var mismatch_chk = func {
|
|||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
||||
error_mismatch.open();
|
||||
}
|
||||
libraries.systemsLoop.stop();
|
||||
print("Mismatch: 0x223");
|
||||
welcome_dlg.close();
|
||||
} else if (getprop("/systems/acconfig/libraries-loaded") != 1) {
|
||||
|
@ -148,6 +152,7 @@ var mismatch_chk = func {
|
|||
if (getprop("/systems/acconfig/out-of-date") != 1) {
|
||||
error_mismatch.open();
|
||||
}
|
||||
libraries.systemsLoop.stop();
|
||||
print("Mismatch: 0x247");
|
||||
welcome_dlg.close();
|
||||
}
|
||||
|
@ -163,14 +168,49 @@ setlistener("/sim/signals/fdm-initialized", func {
|
|||
readSettings();
|
||||
if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/options/revision") < current_revision and getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
||||
updated_dlg.open();
|
||||
if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) {
|
||||
renderingSettings.check();
|
||||
}
|
||||
} else if (getprop("/systems/acconfig/out-of-date") != 1 and getprop("/systems/acconfig/mismatch-code") == "0x000" and getprop("/systems/acconfig/options/welcome-skip") != 1) {
|
||||
welcome_dlg.open();
|
||||
if (getprop("/systems/acconfig/options/no-rendering-warn") != 1) {
|
||||
renderingSettings.check();
|
||||
}
|
||||
}
|
||||
setprop("/systems/acconfig/options/revision", current_revision);
|
||||
writeSettings();
|
||||
spinning.stop();
|
||||
});
|
||||
|
||||
var renderingSettings = {
|
||||
check: func() {
|
||||
var rembrandt = getprop("/sim/rendering/rembrandt/enabled");
|
||||
var ALS = getprop("/sim/rendering/shaders/skydome");
|
||||
var customSettings = getprop("/sim/rendering/shaders/custom-settings") == 1;
|
||||
var landmass = getprop("/sim/rendering/shaders/landmass") >= 4;
|
||||
var model = getprop("/sim/rendering/shaders/model") >= 1;
|
||||
if (!rembrandt and (!ALS or !customSettings or !landmass or !model)) {
|
||||
rendering_dlg.open();
|
||||
}
|
||||
},
|
||||
fixAll: func() {
|
||||
me.fixCore();
|
||||
var landmass = getprop("/sim/rendering/shaders/landmass") >= 4;
|
||||
var model = getprop("/sim/rendering/shaders/model") >= 1;
|
||||
if (!landmass) {
|
||||
setprop("/sim/rendering/shaders/landmass", 4);
|
||||
}
|
||||
if (!model) {
|
||||
setprop("/sim/rendering/shaders/model", 1);
|
||||
}
|
||||
},
|
||||
fixCore: func() {
|
||||
setprop("/sim/rendering/shaders/skydome", 1); # ALS on
|
||||
setprop("/sim/rendering/shaders/custom-settings", 1);
|
||||
gui.popupTip("Rendering Settings updated!");
|
||||
},
|
||||
};
|
||||
|
||||
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"));
|
||||
|
@ -191,6 +231,7 @@ var writeSettings = func {
|
|||
|
||||
# Cold and Dark
|
||||
var colddark = func {
|
||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
||||
spinning.start();
|
||||
ps_load_dlg.open();
|
||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
||||
|
@ -223,6 +264,7 @@ var colddark = func {
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
var colddark_b = func {
|
||||
# Continues the Cold and Dark script, after engines fully shutdown.
|
||||
setprop("/controls/APU/master", 0);
|
||||
|
@ -237,6 +279,7 @@ var colddark_b = func {
|
|||
|
||||
# Ready to Start Eng
|
||||
var beforestart = func {
|
||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
||||
spinning.start();
|
||||
ps_load_dlg.open();
|
||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
||||
|
@ -273,6 +316,7 @@ var beforestart = func {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
var beforestart_b = func {
|
||||
# Continue with engine start prep.
|
||||
setprop("/controls/fuel/tank0pump1", 1);
|
||||
|
@ -312,6 +356,7 @@ var beforestart_b = func {
|
|||
|
||||
# Ready to Taxi
|
||||
var taxi = func {
|
||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
||||
spinning.start();
|
||||
ps_load_dlg.open();
|
||||
setprop("/systems/acconfig/autoconfig-running", 1);
|
||||
|
@ -348,6 +393,7 @@ var taxi = func {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
var taxi_b = func {
|
||||
# Continue with engine start prep, and start engines.
|
||||
setprop("/controls/fuel/tank0pump1", 1);
|
||||
|
@ -404,6 +450,7 @@ var taxi_d = func {
|
|||
|
||||
# Ready to Takeoff
|
||||
var takeoff = func {
|
||||
if (getprop("/systems/acconfig/mismatch-code") == "0x000") {
|
||||
# The same as taxi, except we set some things afterwards.
|
||||
taxi();
|
||||
var eng_one_chk_c = setlistener("/engines/engine[0]/state", func {
|
||||
|
@ -425,3 +472,4 @@ var takeoff = func {
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<layout>hbox</layout>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Aircraft Configuration V1.5.0</label>
|
||||
<label>Aircraft Configuration V1.5.1</label>
|
||||
</text>
|
||||
<empty><stretch>1</stretch></empty>
|
||||
<button>
|
||||
|
|
155
AircraftConfig/rendering.xml
Normal file
155
AircraftConfig/rendering.xml
Normal file
|
@ -0,0 +1,155 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!-- Copyright (c) 2018 Joshua Davidson (it0uchpods) -->
|
||||
|
||||
<!-- A3XX Aircraft Config Dialog -->
|
||||
|
||||
<PropertyList>
|
||||
|
||||
<name>aircraft-config-rendering</name>
|
||||
<layout>vbox</layout>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Rendering Settings</label>
|
||||
</text>
|
||||
<button>
|
||||
<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>left</halign>
|
||||
<label>IDG Aircraft Config has detected that rendering settings are not set properly!</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>This means lighting effects on the exterior and in the virtual cockpit will not be visible.</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>ALS, and custom shader settings must be on.</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Landmass shader must be at least 4 for lightspots to work.</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Model shader must be at least 1 for lightmaps to work.</label>
|
||||
</text>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>Would you like IDG Aircraft Config to automatically turn on ALS and fix shader settings?</label>
|
||||
</text>
|
||||
|
||||
<text>
|
||||
<halign>left</halign>
|
||||
<label>If the settings do not save after fixing, try quitting FlightGear through File -> Exit after fixing.</label>
|
||||
</text>
|
||||
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<checkbox>
|
||||
<label>Do not warn me about rendering settings again</label>
|
||||
<halign>center</halign>
|
||||
<property>/systems/acconfig/options/no-rendering-warn</property>
|
||||
<binding>
|
||||
<command>property-toggle</command>
|
||||
<property>/systems/acconfig/options/no-rendering-warn</property>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.writeSettings();
|
||||
</script>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
</group>
|
||||
|
||||
<hrule/>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>Yes, fix all settings</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.renderingSettings.fixAll();
|
||||
</script>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>Yes, but I'll fix shaders myself</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.renderingSettings.fixCore();
|
||||
</script>
|
||||
</binding>
|
||||
<binding> <!-- Close the non-ALS shader dialog if it is open for some bizarre reason -->
|
||||
<command>dialog-close</command>
|
||||
<dialog-name>shaders</dialog-name>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-show</command>
|
||||
<dialog-name>shaders-lightfield</dialog-name>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
<button>
|
||||
<halign>center</halign>
|
||||
<legend>I don't care</legend>
|
||||
<pref-width>180</pref-width>
|
||||
<binding>
|
||||
<command>dialog-close</command>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
|
@ -160,6 +160,8 @@ var ELEC = {
|
|||
setprop("/systems/electrical/battery2-amps", 0);
|
||||
setprop("/systems/electrical/battery1-percent", 68);
|
||||
setprop("/systems/electrical/battery2-percent", 68);
|
||||
setprop("/systems/electrical/battery1-time", 0);
|
||||
setprop("/systems/electrical/battery2-time", 0);
|
||||
setprop("/systems/electrical/bus/dc1", 0);
|
||||
setprop("/systems/electrical/bus/dc2", 0);
|
||||
setprop("/systems/electrical/bus/dcbat", 0);
|
||||
|
|
|
@ -436,14 +436,10 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fbw/roll/rate-error">
|
||||
<function>
|
||||
<difference>
|
||||
<property>fbw/roll/p-r_s-s</property>
|
||||
<property>fbw/roll/rate-demand-lag</property>
|
||||
</difference>
|
||||
</function>
|
||||
</fcs_function>
|
||||
<summer name="fbw/roll/rate-error">
|
||||
<input>fbw/roll/p-r_s-s</input>
|
||||
<input>-fbw/roll/rate-demand-lag</input>
|
||||
</summer>
|
||||
|
||||
<switch name="fbw/roll/trigger">
|
||||
<default value="0"/>
|
||||
|
@ -735,14 +731,10 @@
|
|||
</function>
|
||||
</fcs_function>
|
||||
|
||||
<fcs_function name="fbw/pitch/g-error">
|
||||
<function>
|
||||
<difference>
|
||||
<property>fbw/pitch/g-computed</property>
|
||||
<property>fbw/pitch/g-demand</property>
|
||||
</difference>
|
||||
</function>
|
||||
</fcs_function>
|
||||
<summer name="fbw/pitch/g-error">
|
||||
<input>fbw/pitch/g-computed</input>
|
||||
<input>-fbw/pitch/g-demand</input>
|
||||
</summer>
|
||||
|
||||
<!-- Goes to Systems/fbw-pitch.xml then back as fbw/pitch/g-pi -->
|
||||
|
||||
|
@ -883,14 +875,10 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<fcs_function name="fbw/pitch/rate-error">
|
||||
<function>
|
||||
<difference>
|
||||
<property>fbw/pitch/t-r_s-s</property>
|
||||
<property>fbw/pitch/rate-demand-lag</property>
|
||||
</difference>
|
||||
</function>
|
||||
</fcs_function>
|
||||
<summer name="fbw/pitch/rate-error">
|
||||
<input>fbw/pitch/t-r_s-s</input>
|
||||
<input>-fbw/pitch/rate-demand-lag</input>
|
||||
</summer>
|
||||
|
||||
<switch name="fbw/pitch/trigger">
|
||||
<default value="0"/>
|
||||
|
|
|
@ -68,38 +68,18 @@
|
|||
|
||||
<filter>
|
||||
<name>FF 1</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/engines/engine[0]/fuel-flow_pph</property>
|
||||
<entry><ind> 0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>2000</ind><dep>1387</dep></entry>
|
||||
<entry><ind>9000</ind><dep>9847</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<type>exponential</type>
|
||||
<input>/engines/engine[0]/fuel-flow_pph</input>
|
||||
<output>/engines/engine[0]/fuel-flow_actual</output>
|
||||
<filter-time>0.32</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
<name>FF 2</name>
|
||||
<type>gain</type>
|
||||
<gain>1.0</gain>
|
||||
<update-interval-secs type="double">0.05</update-interval-secs>
|
||||
<input>
|
||||
<expression>
|
||||
<table>
|
||||
<property>/engines/engine[1]/fuel-flow_pph</property>
|
||||
<entry><ind> 0</ind><dep> 0</dep></entry>
|
||||
<entry><ind>2000</ind><dep>1387</dep></entry>
|
||||
<entry><ind>9000</ind><dep>9847</dep></entry>
|
||||
</table>
|
||||
</expression>
|
||||
</input>
|
||||
<type>exponential</type>
|
||||
<input>/engines/engine[1]/fuel-flow_pph</input>
|
||||
<output>/engines/engine[1]/fuel-flow_actual</output>
|
||||
<filter-time>0.32</filter-time>
|
||||
</filter>
|
||||
|
||||
<filter>
|
||||
|
|
|
@ -1 +1 @@
|
|||
4714
|
||||
4717
|
Reference in a new issue