1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-23 16:25:22 +03:00

Merge pull request #1935 from Asizon/exitDfuButtonFixes

Disabled "Exit DFU Button" when no needed
This commit is contained in:
Michael Keller 2020-03-26 01:28:08 +13:00 committed by GitHub
commit c35bcbba46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -166,6 +166,10 @@ PortHandler.check_usb_devices = function (callback) {
}
if(callback) callback(self.dfu_available);
if (!$('option:selected', portPickerElement).data().isDFU) {
portPickerElement.trigger('change');
}
});
};

View file

@ -981,7 +981,7 @@ TABS.firmware_flasher.initialize = function (callback) {
portPickerElement.change(function () {
if ($('option:selected', this).data().isDFU) {
exitDfuElement.removeClass('disabled');
exitDfuElement.removeClass('disabled');
} else {
exitDfuElement.addClass('disabled');
}
@ -1054,6 +1054,7 @@ TABS.firmware_flasher.initialize = function (callback) {
}
function startFlashing() {
exitDfuElement.addClass('disabled');
if (!GUI.connect_lock) { // button disabled while flashing is in progress
if (self.parsed_hex) {
try {