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

Merge pull request #1402 from McGiverGim/fix_slowdown

Fix slowdown looking for usb devices
This commit is contained in:
Michael Keller 2019-05-01 00:03:05 +12:00 committed by GitHub
commit e0ef4d9bbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,7 @@
'use strict';
const TIMEOUT_CHECK = 500; // With 250 it seems that it produces a memory leak and slowdown in some versions, reason unknown
var usbDevices = { filters: [
{'vendorId': 1155, 'productId': 57105},
{'vendorId': 10473, 'productId': 393}
@ -13,7 +15,7 @@ var PortHandler = new function () {
};
PortHandler.initialize = function () {
// start listening, check after 250ms
// start listening, check after TIMEOUT_CHECK ms
this.check();
};
@ -142,7 +144,7 @@ PortHandler.check = function () {
GUI.updateManualPortVisibility();
setTimeout(function () {
self.check();
}, 250);
}, TIMEOUT_CHECK);
});
};