We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75aa30a commit c842b9dCopy full SHA for c842b9d
src/js/serial_backend.js
@@ -36,6 +36,7 @@ let liveDataRefreshTimerId = false;
36
let isConnected = false;
37
38
const REBOOT_CONNECT_MAX_TIME_MS = 10000;
39
+const REBOOT_GRACE_PERIOD_MS = 2000;
40
let rebootTimestamp = 0;
41
42
const toggleStatus = function () {
@@ -109,6 +110,12 @@ function connectDisconnect() {
109
110
return;
111
}
112
113
+ // When rebooting, adhere to the auto-connect setting
114
+ if (!PortHandler.portPicker.autoConnect && Date.now() - rebootTimestamp < REBOOT_GRACE_PERIOD_MS) {
115
+ console.log(`${logHead} Rebooting, not connecting`);
116
+ return;
117
+ }
118
+
119
console.log(`${logHead} Connecting to: ${portName}`);
120
GUI.connecting_to = portName;
121
0 commit comments