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>
|
||||
</ir>
|
||||
<onbat type="bool">false</onbat>
|
||||
<skip userarchive="y" type="bool">0</skip>
|
||||
</adirs>
|
||||
<APU>
|
||||
<fire-switch type="bool">0</fire-switch>
|
||||
|
@ -520,7 +521,7 @@
|
|||
|
||||
<options n="0">
|
||||
<pfd n="0">
|
||||
<sidestick-pos type="bool">0</sidestick-pos>
|
||||
<sidestick-pos userarchive="y" type="bool">0</sidestick-pos>
|
||||
</pfd>
|
||||
</options>
|
||||
|
||||
|
|
|
@ -12,15 +12,16 @@ var fbw_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/fbw/dialog", "Aircraft/A3
|
|||
init_dlg.open();
|
||||
|
||||
setlistener("/sim/signals/fdm-initialized", func {
|
||||
# loadSettings();
|
||||
init_dlg.close();
|
||||
welcome_dlg.open();
|
||||
});
|
||||
|
||||
#var loadSettings = func {
|
||||
# var file = io.open(getprop("/sim/aircraft-dir")~"/AircraftConfig/settings.conf","r+");
|
||||
# print(file);
|
||||
#}
|
||||
var saveSettings = func {
|
||||
aircraft.data.add("/options/pfd/sidestick-pos", "/controls/adirs/skip");
|
||||
aircraft.data.save();
|
||||
}
|
||||
|
||||
saveSettings();
|
||||
|
||||
var systemsReset = func {
|
||||
systems.elec_init();
|
||||
|
|
|
@ -288,7 +288,7 @@
|
|||
<hrule/>
|
||||
|
||||
<checkbox>
|
||||
<label>Skip IRS Alignment</label>
|
||||
<label>Skip ADIRS Alignment</label>
|
||||
<halign>left</halign>
|
||||
<property>/controls/adirs/skip</property>
|
||||
<binding>
|
||||
|
@ -298,6 +298,12 @@
|
|||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.saveSettings();
|
||||
</script>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
|
@ -312,6 +318,12 @@
|
|||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<binding>
|
||||
<command>nasal</command>
|
||||
<script>
|
||||
acconfig.saveSettings();
|
||||
</script>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</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);
|
||||
|
||||
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);
|
||||
adirs_timer.start();
|
||||
}
|
||||
|
@ -50,7 +49,6 @@ var ADIRSreset = func {
|
|||
setprop("/controls/adirs/ir[1]/fault",0);
|
||||
setprop("/controls/adirs/ir[2]/fault",0);
|
||||
setprop("/controls/adirs/onbat",0);
|
||||
setprop("/controls/adirs/skip",0);
|
||||
setprop("/controls/adirs/mcducbtn",0);
|
||||
adirs_init();
|
||||
}
|
||||
|
|
Reference in a new issue