1
0
Fork 0
This commit is contained in:
legoboyvdlp R 2020-05-08 18:39:33 +01:00
commit 5767d00708
4 changed files with 1052 additions and 997 deletions

File diff suppressed because it is too large Load diff

View file

@ -129,6 +129,7 @@ var revisionFile = (getprop("/sim/aircraft-dir") ~ "/revision.txt");
var current_revision = io.readfile(revisionFile);
print("A320-family Revision: " ~ current_revision);
setprop("/systems/acconfig/revision", current_revision);
setprop("/systems/acconfig/options/fo-view", 0);
setlistener("/systems/acconfig/new-revision", func {
if (getprop("/systems/acconfig/new-revision") > current_revision) {
@ -194,6 +195,11 @@ setlistener("/sim/signals/fdm-initialized", func {
{
save.restore(save.default, getprop("/sim/fg-home") ~ "/Export/" ~ getprop("/sim/aircraft") ~ "-save.xml");
}
if (getprop("/options/system/fo-view") == 1) {
view.setViewByIndex(100);
}
spinning.stop();
});
@ -239,7 +245,7 @@ var readSettings = func {
setprop("/systems/apu/oil/allow-oil-consumption", getprop("/systems/acconfig/options/allow-oil-consumption"));
setprop("/sim/model/autopush/route/show", getprop("/systems/acconfig/options/autopush/show-route"));
setprop("/sim/model/autopush/route/show-wingtip", getprop("/systems/acconfig/options/autopush/show-wingtip"));
setprop("/options/system/fo-view", getprop("/systems/acconfig/options/fo-view"));
}
var writeSettings = func {
@ -250,6 +256,7 @@ var writeSettings = func {
setprop("/systems/acconfig/options/allow-oil-consumption", getprop("/systems/apu/oil/allow-oil-consumption"));
setprop("/systems/acconfig/options/autopush/show-route", getprop("/sim/model/autopush/route/show"));
setprop("/systems/acconfig/options/autopush/show-wingtip", getprop("/sim/model/autopush/route/show-wingtip"));
setprop("/systems/acconfig/options/fo-view", getprop("/options/system/fo-view"));
io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options");
}

View file

@ -127,6 +127,10 @@
<halign>left</halign>
<label>CTRL + K - Disable MCDU keyboard input</label>
</text>
<text>
<halign>left</halign>
<label>CTRL + V - Select Pilot Flying view (See Aircraft Configuration dialog)</label>
</text>
</group>

View file

@ -446,6 +446,26 @@
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>First Officer is the Pilot Flying</label>
<halign>left</halign>
<property>/options/system/fo-view</property>
<binding>
<command>property-toggle</command>
<property>/options/system/fo-view</property>
</binding>
<binding>
<command>dialog-apply</command>
</binding>
<binding>
<command>nasal</command>
<script>
acconfig.writeSettings();
</script>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<!-- TODO there might be a better way to formulate this. -->