diff --git a/src/js/data_storage.js b/src/js/data_storage.js index 38b391d387f..0399abf93ea 100644 --- a/src/js/data_storage.js +++ b/src/js/data_storage.js @@ -11,6 +11,7 @@ const CONFIGURATOR = { connectionValid: false, connectionValidCliOnly: false, + bluetoothMode: false, manualMode: false, virtualMode: false, virtualApiVersion: '0.0.1', diff --git a/src/js/protocols/websocket.js b/src/js/protocols/websocket.js index 418eda0a153..761b30a3ea9 100644 --- a/src/js/protocols/websocket.js +++ b/src/js/protocols/websocket.js @@ -57,17 +57,6 @@ class WebsocketSerial extends EventTarget { return new Uint8Array(buffer); } - waitForConnection(socket) { - return new Promise((resolve) => { - const interval = setInterval(() => { - if (socket.connected) { - clearInterval(interval); // Stop checking - resolve(); // Resolve the promise - } - }, 100); // Check every 100ms, adjust as needed - }); - } - async connect(path, options) { this.address = path; console.log(`${this.logHead} Connecting to ${this.address}`); @@ -85,8 +74,6 @@ class WebsocketSerial extends EventTarget { ); }; - await this.waitForConnection(socket); - this.ws.onclose = function(e) { console.log(`${socket.logHead} Connection closed: `, e);