1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-25 09:15:49 +03:00

Fix vtx saving (#1718)

Fix vtx saving
This commit is contained in:
Michael Keller 2019-10-08 00:47:30 +13:00 committed by GitHub
commit 4c2ac7215f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,6 +9,7 @@ TABS.vtx = {
VTXTABLE_BAND_LIST: [], VTXTABLE_BAND_LIST: [],
VTXTABLE_POWERLEVEL_LIST: [], VTXTABLE_POWERLEVEL_LIST: [],
analyticsChanges: {}, analyticsChanges: {},
updating: true,
}; };
TABS.vtx.initialize = function (callback) { TABS.vtx.initialize = function (callback) {
@ -38,6 +39,7 @@ TABS.vtx.initialize = function (callback) {
// translate to user-selected language // translate to user-selected language
i18n.localizePage(); i18n.localizePage();
self.updating = false;
GUI.content_ready(callback); GUI.content_ready(callback);
} }
@ -503,7 +505,9 @@ TABS.vtx.initialize = function (callback) {
}); });
$('a.save').click(function () { $('a.save').click(function () {
save_vtx(); if (!self.updating) {
save_vtx();
}
}); });
} }
@ -651,6 +655,7 @@ TABS.vtx.initialize = function (callback) {
// Save all the values from the tab to MSP // Save all the values from the tab to MSP
function save_vtx() { function save_vtx() {
self.updating = true;
dump_html_to_msp(); dump_html_to_msp();