✅ update 参数调试
This commit is contained in:
@ -10,6 +10,7 @@ class TCPClient:
|
||||
self.port = port
|
||||
self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.client_socket.settimeout(5)
|
||||
self.connected = False
|
||||
|
||||
|
||||
def CreatConnect(self):
|
||||
@ -26,9 +27,14 @@ class TCPClient:
|
||||
|
||||
def run(self):
|
||||
while True:
|
||||
time.sleep(30)
|
||||
if (self.send_Command() and self.send_Status()):
|
||||
self.error_count=0
|
||||
time.sleep(0.2)
|
||||
self.connected = self.error_count > 0
|
||||
try:
|
||||
#time.sleep(30)
|
||||
if (self.send_Command() and self.send_Status()):
|
||||
self.error_count = 0
|
||||
except:
|
||||
self.error_count += 1
|
||||
|
||||
|
||||
def send_Command(self):
|
||||
|
||||
Reference in New Issue
Block a user