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

Change Auto-Connect timeout

This commit is contained in:
Mark Haslinghuis 2021-04-12 23:33:43 +02:00
parent ceea7ef60b
commit 3b90d3d520
6 changed files with 63 additions and 22 deletions

View file

@ -174,9 +174,15 @@ PortHandler.detectPort = function(currentPorts) {
if (GUI.auto_connect && !GUI.connecting_to && !GUI.connected_to) {
// start connect procedure. We need firmware flasher protection over here
if (GUI.active_tab !== 'firmware_flasher') {
GUI.timeout_add('auto-connect_timeout', function () {
$('div#header_btns a.connect').click();
}, 100); // timeout so bus have time to initialize after being detected by the system
let connectionTimeout = 100;
ConfigStorage.get('connectionTimeout', function (result) {
if (result.connectionTimeout) {
connectionTimeout = result.connectionTimeout;
}
GUI.timeout_add('auto-connect_timeout', function () {
$('div#header_btns a.connect').click();
}, connectionTimeout); // timeout so bus have time to initialize after being detected by the system
});
}
}
// trigger callbacks