From f2e56f3924e8644c5aa3ecbcdd5bc66132f7c9b4 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 11 Feb 2025 16:09:35 +1300 Subject: [PATCH] add disconnect button --- index.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.html b/index.html index 780a415..f1d11ac 100644 --- a/index.html +++ b/index.html @@ -26,6 +26,9 @@ + @@ -83,6 +86,12 @@ this.device = await Device.fromSerialPort(serialPort); }, + async disconnect() { + if(this.device){ + await this.device.close(); + this.device = null; + } + }, async sendCommandAppStart() { await this.device.sendCommandAppStart(); },