consistant settings between sessions
This commit is contained in:
parent
855105568b
commit
1b93911ff0
5 changed files with 21 additions and 11 deletions
|
@ -391,6 +391,7 @@
|
||||||
<fault type="bool">false</fault>
|
<fault type="bool">false</fault>
|
||||||
</ir>
|
</ir>
|
||||||
<onbat type="bool">false</onbat>
|
<onbat type="bool">false</onbat>
|
||||||
|
<skip userarchive="y" type="bool">0</skip>
|
||||||
</adirs>
|
</adirs>
|
||||||
<APU>
|
<APU>
|
||||||
<fire-switch type="bool">0</fire-switch>
|
<fire-switch type="bool">0</fire-switch>
|
||||||
|
@ -520,7 +521,7 @@
|
||||||
|
|
||||||
<options n="0">
|
<options n="0">
|
||||||
<pfd n="0">
|
<pfd n="0">
|
||||||
<sidestick-pos type="bool">0</sidestick-pos>
|
<sidestick-pos userarchive="y" type="bool">0</sidestick-pos>
|
||||||
</pfd>
|
</pfd>
|
||||||
</options>
|
</options>
|
||||||
|
|
||||||
|
|
|
@ -12,15 +12,16 @@ var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A3
|
||||||
init_dlg.open();
|
init_dlg.open();
|
||||||
|
|
||||||
setlistener("/sim/signals/fdm-initialized", func {
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
# loadSettings();
|
|
||||||
init_dlg.close();
|
init_dlg.close();
|
||||||
welcome_dlg.open();
|
welcome_dlg.open();
|
||||||
});
|
});
|
||||||
|
|
||||||
#var loadSettings = func {
|
var saveSettings = func {
|
||||||
# var file = io.open(getprop("/sim/aircraft-dir")~"/AircraftConfig/settings.conf","r+");
|
aircraft.data.add("/options/pfd/sidestick-pos", "/controls/adirs/skip");
|
||||||
# print(file);
|
aircraft.data.save();
|
||||||
#}
|
}
|
||||||
|
|
||||||
|
saveSettings();
|
||||||
|
|
||||||
var systemsReset = func {
|
var systemsReset = func {
|
||||||
systems.elec_init();
|
systems.elec_init();
|
||||||
|
|
|
@ -288,7 +288,7 @@
|
||||||
<hrule/>
|
<hrule/>
|
||||||
|
|
||||||
<checkbox>
|
<checkbox>
|
||||||
<label>Skip IRS Alignment</label>
|
<label>Skip ADIRS Alignment</label>
|
||||||
<halign>left</halign>
|
<halign>left</halign>
|
||||||
<property>/controls/adirs/skip</property>
|
<property>/controls/adirs/skip</property>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -298,6 +298,12 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
</binding>
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
acconfig.saveSettings();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
|
|
||||||
|
@ -312,6 +318,12 @@
|
||||||
<binding>
|
<binding>
|
||||||
<command>dialog-apply</command>
|
<command>dialog-apply</command>
|
||||||
</binding>
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
acconfig.saveSettings();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
</checkbox>
|
</checkbox>
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
skipADIRS=0
|
|
||||||
showPFDSideStick=0
|
|
|
@ -15,7 +15,6 @@ setprop("/systems/electrical/bus/ac2", 0);
|
||||||
setprop("/systems/electrical/bus/ac-ess", 0);
|
setprop("/systems/electrical/bus/ac-ess", 0);
|
||||||
|
|
||||||
var adirs_init = func {
|
var adirs_init = func {
|
||||||
setprop("controls/adirs/skip",0); #define this here, as we want this to be off on startup
|
|
||||||
setprop("/controls/adirs/mcducbtn",0);
|
setprop("/controls/adirs/mcducbtn",0);
|
||||||
adirs_timer.start();
|
adirs_timer.start();
|
||||||
}
|
}
|
||||||
|
@ -50,7 +49,6 @@ var ADIRSreset = func {
|
||||||
setprop("/controls/adirs/ir[1]/fault",0);
|
setprop("/controls/adirs/ir[1]/fault",0);
|
||||||
setprop("/controls/adirs/ir[2]/fault",0);
|
setprop("/controls/adirs/ir[2]/fault",0);
|
||||||
setprop("/controls/adirs/onbat",0);
|
setprop("/controls/adirs/onbat",0);
|
||||||
setprop("/controls/adirs/skip",0);
|
|
||||||
setprop("/controls/adirs/mcducbtn",0);
|
setprop("/controls/adirs/mcducbtn",0);
|
||||||
adirs_init();
|
adirs_init();
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue