From 9316eb44e75cbce3525ee9d9733fe92b24463c51 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Fri, 9 Aug 2019 18:49:00 +0000 Subject: [PATCH] reorder a read of a configuration on receiver tab --- src/js/tabs/receiver.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/tabs/receiver.js b/src/js/tabs/receiver.js index 5350f652..adb873b4 100644 --- a/src/js/tabs/receiver.js +++ b/src/js/tabs/receiver.js @@ -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();