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

Reset when no flashing,remove reset when erase chip is checked

This commit is contained in:
Asizon 2020-12-13 12:46:44 +01:00
parent 1647ca6ec5
commit 0a98eee4b3
3 changed files with 4 additions and 4 deletions

View file

@ -80,7 +80,7 @@
{{ $t("versionLabelFirmware") }}: {{ firmwareVersion }}
{{ firmwareId }}
</span>
<span class="hardwareId" v-if="hardwareId">
<span v-if="hardwareId">
{{ $t("versionLabelTarget") }}: {{ hardwareId }}
</span>
</div>

View file

@ -90,6 +90,9 @@ PortHandler.check_usb_devices = function (callback) {
callback(self.dfu_available);
}
if (!$('option:selected', self.portPickerElement).data().isDFU) {
if (!(GUI.connected_to || GUI.connect_lock)) {
FC.resetState();
}
self.portPickerElement.trigger('change');
}
});

View file

@ -775,7 +775,6 @@ STM32DFU_protocol.prototype.upload_procedure = function (step) {
for (var j = 0; j < self.flash_layout.sectors[i].num_pages; j++) {
if (self.options.erase_chip) {
// full chip erase
FC.resetState();
erase_pages.push({'sector': i, 'page': j});
} else {
// local erase
@ -1075,8 +1074,6 @@ STM32DFU_protocol.prototype.leave = function () {
STM32DFU_protocol.prototype.cleanup = function () {
const self = this;
FC.resetState();
self.releaseInterface(0);
GUI.connect_lock = false;