Skip to content

Commit 67be783

Browse files
committed
Added condition to avoid duplication when is connected
1 parent 95665de commit 67be783

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/protocols/stm32.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ STM32_protocol.prototype.connect = function (port, baud, hex, options, callback)
162162
GUI.log(i18n.getMessage('deviceRebooting_romBootloader'));
163163
console.log('no flash bootloader detected');
164164
rebootMode = 1; // MSP_REBOOT_BOOTLOADER_ROM;
165-
}
166-
FC.resetState();
165+
}
166+
if (!GUI.connected_to) {
167+
FC.resetState();
168+
}
167169

168170
var buffer = [];
169171
buffer.push8(rebootMode);

0 commit comments

Comments
 (0)