reorder a read of a configuration on receiver tab

10.7.0-preview
Kyle K 2019-08-09 18:49:00 +00:00
parent 11de751a5d
commit 9316eb44e7
1 changed files with 8 additions and 8 deletions

View File

@ -62,14 +62,6 @@ TABS.receiver.initialize = function (callback) {
// translate to user-selected language
i18n.localizePage();
ConfigStorage.get('rx_refresh_rate', function (result) {
if (result.rx_refresh_rate) {
$('select[name="rx_refresh_rate"]').val(result.rx_refresh_rate).change();
} else {
$('select[name="rx_refresh_rate"]').change(); // start with default value
}
});
if (semver.lt(CONFIG.apiVersion, "1.15.0")) {
$('.deadband').hide();
} else {
@ -524,6 +516,14 @@ TABS.receiver.initialize = function (callback) {
GUI.interval_add('receiver_pull', get_rc_data, plot_update_rate, true);
});
ConfigStorage.get('rx_refresh_rate', function (result) {
if (result.rx_refresh_rate) {
$('select[name="rx_refresh_rate"]').val(result.rx_refresh_rate).change();
} else {
$('select[name="rx_refresh_rate"]').change(); // start with default value
}
});
// Setup model for preview
tab.initModelPreview();
tab.renderModel();