diff --git a/tabs/firmware_flasher.html b/tabs/firmware_flasher.html
index 25d6464f40..f1fee95863 100644
--- a/tabs/firmware_flasher.html
+++ b/tabs/firmware_flasher.html
@@ -55,6 +55,13 @@
a.flash_firmware:hover {
background-color: #dedcdc;
}
+ a.flash_firmware.locked {
+ background-color: #b8b8b8;
+ }
+ a.flash_firmware.locked:hover {
+ cursor: default;
+ background-color: #b8b8b8;
+ }
a.back {
display: block;
position: absolute;
@@ -112,7 +119,7 @@
Warning
diff --git a/tabs/firmware_flasher.js b/tabs/firmware_flasher.js
index cf2ea74c3e..755fbff80f 100644
--- a/tabs/firmware_flasher.js
+++ b/tabs/firmware_flasher.js
@@ -34,6 +34,7 @@ function tab_initialize_firmware_flasher() {
raw_hex = read_hex_file(intel_hex);
$('span.size').html((raw_hex.length / 1000) + ' kB');
+ $('a.flash_firmware').removeClass('locked');
};
reader.readAsText(file);
@@ -55,21 +56,25 @@ function tab_initialize_firmware_flasher() {
$('span.path').html('Using remote Firmware');
$('span.size').html((raw_hex.length / 1000) + ' kB');
+ $('a.flash_firmware').removeClass('locked');
STM32.GUI_status('
Remote Firmware loaded, ready for flashing');
}).fail(function() {
STM32.GUI_status('
Failed to load remote firmware');
+ $('a.flash_firmware').addClass('locked');
});
});
$('a.flash_firmware').click(function() {
- if (!GUI.connect_lock) { // button disabled while flashing is in progress
- if (raw_hex != false) {
- STM32.hex_to_flash = raw_hex.slice(0);
-
- STM32.connect();
- } else {
- STM32.GUI_status('
Firmware not loaded');
+ if (!$(this).hasClass('locked')) {
+ if (!GUI.connect_lock) { // button disabled while flashing is in progress
+ if (raw_hex != false) {
+ STM32.hex_to_flash = raw_hex.slice(0);
+
+ STM32.connect();
+ } else {
+ STM32.GUI_status('
Firmware not loaded');
+ }
}
}
});