diff --git a/static/js/BLE.js b/static/js/BLE.js index 5bb9b99..7688024 100644 --- a/static/js/BLE.js +++ b/static/js/BLE.js @@ -26,7 +26,7 @@ async function connect(props) { console.log("> Characteristic value changed event listener added"); socket = io(); - socket.addEventListener("open", () => { + socket.on("connect", () => { btn.classList.remove("bg-red-600"); btn.classList.add("bg-green-600"); }); diff --git a/templates/device.html b/templates/device.html index a9abc1f..4b48ef9 100644 --- a/templates/device.html +++ b/templates/device.html @@ -29,7 +29,7 @@ -
+