mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-07-23 06:51:08 -04:00
Added flow control timeouts to AX.25 interface and optimised timeouts.
This commit is contained in:
parent
cd9daaefee
commit
425f0153d0
2 changed files with 13 additions and 10 deletions
|
@ -60,7 +60,7 @@ class KISSInterface(Interface):
|
|||
self.packet_queue = []
|
||||
self.flow_control = flow_control
|
||||
self.interface_ready = False
|
||||
self.flow_control_timeout = 10
|
||||
self.flow_control_timeout = 5
|
||||
self.flow_control_locked = time.time()
|
||||
|
||||
self.preamble = preamble if preamble != None else 350;
|
||||
|
@ -259,12 +259,12 @@ class KISSInterface(Interface):
|
|||
in_frame = False
|
||||
command = KISS.CMD_UNKNOWN
|
||||
escape = False
|
||||
sleep(0.08)
|
||||
sleep(0.05)
|
||||
|
||||
if self.flow_control:
|
||||
if not self.interface_ready:
|
||||
if time.time() > self.flow_control_locked + self.flow_control_timeout:
|
||||
RNS.log("Interface "+str(self)+" is unlocking flow control due to time-out. This should not happen. Your hardware might have missed a flow-control READY command.", RNS.LOG_WARNING)
|
||||
RNS.log("Interface "+str(self)+" is unlocking flow control due to time-out. This should not happen. Your hardware might have missed a flow-control READY command, or maybe it does not support flow-control.", RNS.LOG_WARNING)
|
||||
self.process_queue()
|
||||
|
||||
if self.beacon_i != None and self.beacon_d != None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue