update 流程调试

This commit is contained in:
hjw
2024-09-04 20:29:08 +08:00
parent e1b7784b9a
commit d9bf3f5b27
7 changed files with 57 additions and 37 deletions

View File

@ -19,7 +19,7 @@ class RobotClient(TCPClient):
try:
if self.command_quene.qsize()!=0:
command = self.command_quene.get()
self.client_socket.send(command.encode('utf-8'))
self.client_socket.send(command.encode())
if False:
response = self.client_socket.recv(1024).decode('utf-8')
@ -48,19 +48,20 @@ class RobotClient(TCPClient):
# 转字符串
try:
self.client_socket.send(request_status_json.encode('utf-8'))
self.client_socket.send(request_status_json.encode())
if True:
response = self.client_socket.recv(1024).decode('utf-8')
response_message = json.loads(response)
if True:
data_status = DATAReply()
data_status.__dict__ = response_message
data_address_array = data_status.queryAddr
data_address_array = data_status.queryData
data_Address = DataAddress()
data_Address.setPosition(*data_address_array)
self.status_model.setPosition(*data_address_array)
return True
except Exception as e:
print(e.with_traceback())
return False