1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-18 22:05:13 +03:00

detect default stm or cp210[x] serial port

This commit is contained in:
Mark Haslinghuis 2020-09-04 19:43:50 +02:00
parent 8032b1f4ee
commit 9ae3230edd
4 changed files with 104 additions and 116 deletions

View file

@ -223,19 +223,6 @@ function onOpen(openInfo) {
GUI.log(i18n.getMessage('serialPortOpened', [openInfo.connectionId]));
// save selected port with chrome.storage if the port differs
ConfigStorage.get('last_used_port', function (result) {
if (result.last_used_port) {
if (result.last_used_port != GUI.connected_to) {
// last used port doesn't match the one found in local db, we will store the new one
ConfigStorage.set({'last_used_port': GUI.connected_to});
}
} else {
// variable isn't stored yet, saving
ConfigStorage.set({'last_used_port': GUI.connected_to});
}
});
serial.onReceive.addListener(read_serial);
setConnectionTimeout();