mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-12-17 17:34:56 -05:00
Updated RNode TCP read timeouts
This commit is contained in:
parent
fcdcf1a2a8
commit
237c3160eb
2 changed files with 4 additions and 4 deletions
|
|
@ -759,7 +759,7 @@ class RNodeInterface(Interface):
|
||||||
RNS.log(f"BLE connection {self.port} to RNode now open")
|
RNS.log(f"BLE connection {self.port} to RNode now open")
|
||||||
|
|
||||||
if self.tcp != None and self.tcp.connected:
|
if self.tcp != None and self.tcp.connected:
|
||||||
self.timeout = 1000
|
self.timeout = 1500
|
||||||
RNS.log(f"TCP connection tcp://{self.tcp_host} to RNode now open")
|
RNS.log(f"TCP connection tcp://{self.tcp_host} to RNode now open")
|
||||||
|
|
||||||
RNS.log("Configuring RNode interface...", RNS.LOG_VERBOSE)
|
RNS.log("Configuring RNode interface...", RNS.LOG_VERBOSE)
|
||||||
|
|
@ -1479,7 +1479,7 @@ class RNodeInterface(Interface):
|
||||||
if got == 0:
|
if got == 0:
|
||||||
time_since_last = int(time.time()*1000) - last_read_ms
|
time_since_last = int(time.time()*1000) - last_read_ms
|
||||||
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
||||||
RNS.log(f"{self} serial read timeout in command {command} after {RNS.prettytime(self.timeout/1000.0)}", RNS.LOG_WARNING)
|
RNS.log(f"{self} device read timeout in command {command} after {RNS.prettytime(self.timeout/1000.0)}", RNS.LOG_WARNING)
|
||||||
data_buffer = b""
|
data_buffer = b""
|
||||||
in_frame = False
|
in_frame = False
|
||||||
command = KISS.CMD_UNKNOWN
|
command = KISS.CMD_UNKNOWN
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ class RNodeInterface(Interface):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
if self.use_tcp:
|
if self.use_tcp:
|
||||||
self.timeout = 1000
|
self.timeout = 1500
|
||||||
RNS.log(f"Opening TCP connection for {self}...")
|
RNS.log(f"Opening TCP connection for {self}...")
|
||||||
if self.tcp != None and self.tcp.running == False:
|
if self.tcp != None and self.tcp.running == False:
|
||||||
self.tcp.close()
|
self.tcp.close()
|
||||||
|
|
@ -1111,7 +1111,7 @@ class RNodeInterface(Interface):
|
||||||
else:
|
else:
|
||||||
time_since_last = int(time.time()*1000) - last_read_ms
|
time_since_last = int(time.time()*1000) - last_read_ms
|
||||||
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
||||||
RNS.log(str(self)+" serial read timeout in command "+str(command), RNS.LOG_WARNING)
|
RNS.log(f"{self} device read timeout in command {command} after {RNS.prettytime(self.timeout/1000.0)}", RNS.LOG_WARNING)
|
||||||
data_buffer = b""
|
data_buffer = b""
|
||||||
in_frame = False
|
in_frame = False
|
||||||
command = KISS.CMD_UNKNOWN
|
command = KISS.CMD_UNKNOWN
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue