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

Fix VTX status

This commit is contained in:
Mark Haslinghuis 2022-10-06 23:25:07 +02:00
parent 516fc45da1
commit 2a3a83e1db
2 changed files with 18 additions and 6 deletions

View file

@ -885,13 +885,21 @@ vtx.initialize = function (callback) {
TABS.vtx.vtxTableSavePending = false;
const oldText = $("#save_button").text();
$("#save_button").html(i18n.getMessage('vtxButtonSaved'));
setTimeout(function () {
$("#save_button").html(oldText);
}, 2000);
const saveButton = $("#save_button");
const oldText = saveButton.text();
const buttonDelay = 2000;
TABS.vtx.initialize();
saveButton.html(i18n.getMessage('vtxButtonSaving')).addClass('disabled');
// Allow firmware to make relevant changes before initialization
setTimeout(() => {
saveButton.html(i18n.getMessage('vtxButtonSaved'));
setTimeout(() => {
TABS.vtx.initialize();
saveButton.html(oldText).removeClass('disabled');
}, buttonDelay);
}, buttonDelay);
}
}