DU: Now can adjust the framerate of DUs
This commit is contained in:
parent
faa03fb517
commit
ab42b3d112
9 changed files with 302 additions and 1 deletions
|
@ -89,6 +89,11 @@ setprop("/systems/acconfig/mismatch-reason", "XX");
|
||||||
setprop("/systems/acconfig/options/keyboard-mode", 0);
|
setprop("/systems/acconfig/options/keyboard-mode", 0);
|
||||||
setprop("/systems/acconfig/options/adirs-skip", 0);
|
setprop("/systems/acconfig/options/adirs-skip", 0);
|
||||||
setprop("/systems/acconfig/options/welcome-skip", 0);
|
setprop("/systems/acconfig/options/welcome-skip", 0);
|
||||||
|
setprop("/systems/acconfig/options/pfd-rate", 1);
|
||||||
|
setprop("/systems/acconfig/options/nd-rate", 1);
|
||||||
|
setprop("/systems/acconfig/options/uecam-rate", 1);
|
||||||
|
setprop("/systems/acconfig/options/lecam-rate", 1);
|
||||||
|
setprop("/systems/acconfig/options/iesi-rate", 1);
|
||||||
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/IDG-A32X/AircraftConfig/main.xml");
|
var main_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/main/dialog", "Aircraft/IDG-A32X/AircraftConfig/main.xml");
|
||||||
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/IDG-A32X/AircraftConfig/welcome.xml");
|
var welcome_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/welcome/dialog", "Aircraft/IDG-A32X/AircraftConfig/welcome.xml");
|
||||||
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/IDG-A32X/AircraftConfig/psload.xml");
|
var ps_load_dlg = gui.Dialog.new("sim/gui/dialogs/acconfig/psload/dialog", "Aircraft/IDG-A32X/AircraftConfig/psload.xml");
|
||||||
|
@ -102,6 +107,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 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 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 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");
|
||||||
spinning.start();
|
spinning.start();
|
||||||
init_dlg.open();
|
init_dlg.open();
|
||||||
|
|
||||||
|
|
248
AircraftConfig/du-framerate.xml
Normal file
248
AircraftConfig/du-framerate.xml
Normal file
|
@ -0,0 +1,248 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
##############################################
|
||||||
|
# Copyright (c) Joshua Davidson (it0uchpods) #
|
||||||
|
##############################################
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- A3XX Aircraft Config Dialog -->
|
||||||
|
|
||||||
|
<PropertyList>
|
||||||
|
|
||||||
|
<name>aircraft-config-du-framerate</name>
|
||||||
|
<layout>vbox</layout>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>hbox</layout>
|
||||||
|
<text>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>DU Framerate</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>Here you can adjust the framerate of the Display Units. 1 = Best Quality, 10 = Best Performance</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>table</layout>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>0</row>
|
||||||
|
<col>0</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Both PFDs:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<row>0</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>250</pref-width>
|
||||||
|
<property>/systems/acconfig/options/pfd-rate</property>
|
||||||
|
<min>1</min>
|
||||||
|
<max>5</max>
|
||||||
|
<step>0.5</step>
|
||||||
|
<live>true</live>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>0</row>
|
||||||
|
<col>2</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<border>1</border>
|
||||||
|
<label>999</label>
|
||||||
|
<property>/systems/acconfig/options/pfd-rate</property>
|
||||||
|
<live>1</live>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>1</row>
|
||||||
|
<col>0</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Both NDs:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<row>1</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>250</pref-width>
|
||||||
|
<property>/systems/acconfig/options/nd-rate</property>
|
||||||
|
<min>1</min>
|
||||||
|
<max>5</max>
|
||||||
|
<step>0.5</step>
|
||||||
|
<live>true</live>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>1</row>
|
||||||
|
<col>2</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<border>1</border>
|
||||||
|
<label>999</label>
|
||||||
|
<property>/systems/acconfig/options/nd-rate</property>
|
||||||
|
<live>1</live>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>2</row>
|
||||||
|
<col>0</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Upper ECAM:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<row>2</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>250</pref-width>
|
||||||
|
<property>/systems/acconfig/options/uecam-rate</property>
|
||||||
|
<min>1</min>
|
||||||
|
<max>5</max>
|
||||||
|
<step>0.5</step>
|
||||||
|
<live>true</live>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>2</row>
|
||||||
|
<col>2</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<border>1</border>
|
||||||
|
<label>999</label>
|
||||||
|
<property>/systems/acconfig/options/uecam-rate</property>
|
||||||
|
<live>1</live>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>3</row>
|
||||||
|
<col>0</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>Lower ECAM:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<row>3</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>250</pref-width>
|
||||||
|
<property>/systems/acconfig/options/lecam-rate</property>
|
||||||
|
<min>1</min>
|
||||||
|
<max>5</max>
|
||||||
|
<step>0.5</step>
|
||||||
|
<live>true</live>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>3</row>
|
||||||
|
<col>2</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<border>1</border>
|
||||||
|
<label>999</label>
|
||||||
|
<property>/systems/acconfig/options/lecam-rate</property>
|
||||||
|
<live>1</live>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>4</row>
|
||||||
|
<col>0</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<label>IESI:</label>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
<slider>
|
||||||
|
<row>4</row>
|
||||||
|
<col>1</col>
|
||||||
|
<pref-width>250</pref-width>
|
||||||
|
<property>/systems/acconfig/options/iesi-rate</property>
|
||||||
|
<min>1</min>
|
||||||
|
<max>5</max>
|
||||||
|
<step>0.5</step>
|
||||||
|
<live>true</live>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-apply</command>
|
||||||
|
</binding>
|
||||||
|
</slider>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>4</row>
|
||||||
|
<col>2</col>
|
||||||
|
<halign>left</halign>
|
||||||
|
<border>1</border>
|
||||||
|
<label>999</label>
|
||||||
|
<property>/systems/acconfig/options/iesi-rate</property>
|
||||||
|
<live>1</live>
|
||||||
|
</text>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
|
||||||
|
</group>
|
||||||
|
|
||||||
|
<hrule/>
|
||||||
|
|
||||||
|
<group>
|
||||||
|
<layout>hbox</layout>
|
||||||
|
|
||||||
|
<button>
|
||||||
|
<halign>center</halign>
|
||||||
|
<legend>Apply/Save</legend>
|
||||||
|
<pref-width>100</pref-width>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
acconfig.writeSettings();
|
||||||
|
canvas_pfd.rateApply();
|
||||||
|
canvas_nd.rateApply();
|
||||||
|
canvas_ecam.u_rateApply();
|
||||||
|
canvas_ecam.l_rateApply();
|
||||||
|
canvas_iesi.rateApply();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
<button>
|
||||||
|
<halign>center</halign>
|
||||||
|
<legend>Apply/Save/Go Away</legend>
|
||||||
|
<pref-width>200</pref-width>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
acconfig.writeSettings();
|
||||||
|
canvas_pfd.rateApply();
|
||||||
|
canvas_nd.rateApply();
|
||||||
|
canvas_ecam.u_rateApply();
|
||||||
|
canvas_ecam.l_rateApply();
|
||||||
|
canvas_iesi.rateApply();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>dialog-close</command>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
|
</group>
|
||||||
|
|
||||||
|
</PropertyList>
|
|
@ -75,6 +75,17 @@
|
||||||
</script>
|
</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
<button>
|
||||||
|
<halign>center</halign>
|
||||||
|
<legend>DU Framerate</legend>
|
||||||
|
<pref-width>140</pref-width>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>
|
||||||
|
acconfig.du_framerate.open();
|
||||||
|
</script>
|
||||||
|
</binding>
|
||||||
|
</button>
|
||||||
</group>
|
</group>
|
||||||
|
|
||||||
<group>
|
<group>
|
||||||
|
|
|
@ -182,8 +182,15 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
IESI = canvas_IESI.new(group_IESI, "Aircraft/IDG-A32X/Models/Instruments/IESI/res/iesi.svg");
|
IESI = canvas_IESI.new(group_IESI, "Aircraft/IDG-A32X/Models/Instruments/IESI/res/iesi.svg");
|
||||||
|
|
||||||
IESI_update.start();
|
IESI_update.start();
|
||||||
|
if (getprop("/systems/acconfig/options/iesi-rate") > 1) {
|
||||||
|
rateApply();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var rateApply = func {
|
||||||
|
IESI_update.restart(0.07 * getprop("/systems/acconfig/options/iesi-rate"));
|
||||||
|
}
|
||||||
|
|
||||||
var IESI_update = maketimer(0.07, func {
|
var IESI_update = maketimer(0.07, func {
|
||||||
canvas_IESI_base.update();
|
canvas_IESI_base.update();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1384,8 +1384,15 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
lowerECAM_test = canvas_lowerECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
||||||
|
|
||||||
lowerECAM_update.start();
|
lowerECAM_update.start();
|
||||||
|
if (getprop("/systems/acconfig/options/lecam-rate") > 1) {
|
||||||
|
l_rateApply();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var l_rateApply = func {
|
||||||
|
lowerECAM_update.restart(0.05 * getprop("/systems/acconfig/options/lecam-rate"));
|
||||||
|
}
|
||||||
|
|
||||||
var lowerECAM_update = maketimer(0.05, func {
|
var lowerECAM_update = maketimer(0.05, func {
|
||||||
canvas_lowerECAM_base.update();
|
canvas_lowerECAM_base.update();
|
||||||
});
|
});
|
||||||
|
|
|
@ -295,8 +295,15 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
ND_2_test = canvas_ND_2_test.new(group_nd2_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
ND_2_test = canvas_ND_2_test.new(group_nd2_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
||||||
|
|
||||||
nd_update.start();
|
nd_update.start();
|
||||||
|
if (getprop("/systems/acconfig/options/nd-rate") > 1) {
|
||||||
|
rateApply();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var rateApply = func {
|
||||||
|
nd_update.restart(0.05 * getprop("/systems/acconfig/options/nd-rate"));
|
||||||
|
}
|
||||||
|
|
||||||
var nd_update = maketimer(0.05, func {
|
var nd_update = maketimer(0.05, func {
|
||||||
canvas_nd_base.update();
|
canvas_nd_base.update();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1206,8 +1206,16 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
|
|
||||||
PFD_update.start();
|
PFD_update.start();
|
||||||
PFD_update_fast.start();
|
PFD_update_fast.start();
|
||||||
|
if (getprop("/systems/acconfig/options/pfd-rate") > 1) {
|
||||||
|
rateApply();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var rateApply = func {
|
||||||
|
PFD_update.restart(0.15 * getprop("/systems/acconfig/options/pfd-rate"));
|
||||||
|
PFD_update_fast.restart(0.05 * getprop("/systems/acconfig/options/pfd-rate"));
|
||||||
|
}
|
||||||
|
|
||||||
var PFD_update = maketimer(0.15, func {
|
var PFD_update = maketimer(0.15, func {
|
||||||
canvas_PFD_base.updateSlow();
|
canvas_PFD_base.updateSlow();
|
||||||
});
|
});
|
||||||
|
|
|
@ -915,8 +915,15 @@ setlistener("sim/signals/fdm-initialized", func {
|
||||||
upperECAM_test = canvas_upperECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
upperECAM_test = canvas_upperECAM_test.new(group_test, "Aircraft/IDG-A32X/Models/Instruments/Common/res/du-test.svg");
|
||||||
|
|
||||||
upperECAM_update.start();
|
upperECAM_update.start();
|
||||||
|
if (getprop("/systems/acconfig/options/uecam-rate") > 1) {
|
||||||
|
u_rateApply();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var u_rateApply = func {
|
||||||
|
upperECAM_update.restart(0.05 * getprop("/systems/acconfig/options/uecam-rate"));
|
||||||
|
}
|
||||||
|
|
||||||
var upperECAM_update = maketimer(0.05, func {
|
var upperECAM_update = maketimer(0.05, func {
|
||||||
canvas_upperECAM_base.update();
|
canvas_upperECAM_base.update();
|
||||||
});
|
});
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
4401
|
4402
|
Reference in a new issue