From 64f12e8316e89e17b6e2ff78c22ddeb83a7ae651 Mon Sep 17 00:00:00 2001 From: htmltiger <1429451+htmltiger@users.noreply.github.com> Date: Fri, 23 Jun 2023 02:30:13 +0100 Subject: [PATCH] addec checkbox for autoconnect, fixed default reconnection --- io/serialport/25-serial.html | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/io/serialport/25-serial.html b/io/serialport/25-serial.html index 6bf9c382..778bc4ee 100644 --- a/io/serialport/25-serial.html +++ b/io/serialport/25-serial.html @@ -213,12 +213,14 @@
- +
-
+
+ + - +
@@ -251,7 +253,8 @@ out: {value:"char"}, addchar: {value:""}, responsetimeout: {value: 10000}, - serialReconnectTime: {value: 15000} + serialReconnectTime: {value: ""}, + autoConnect: {value: true} }, label: function() { this.serialbaud = this.serialbaud || 57600; @@ -261,6 +264,8 @@ return this.serialport+":"+this.serialbaud+"-"+this.databits+this.parity.charAt(0).toUpperCase()+this.stopbits; }, oneditprepare: function() { + if(typeof this.autoConnect === "undefined"){ this.autoConnect = true; } + var previous = null; var blist = [ {value:"230400",label:"230400",hasValue:false}, @@ -357,6 +362,7 @@ }).autocomplete("search",""); }); }); + }, oneditsave: function() { var mytype = $("#node-config-input-serialbaud").typedInput('type');