image_font
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
import logging
|
||||
from enum import Enum
|
||||
from turtle import Turtle
|
||||
# from numpy.array_api import trunc
|
||||
|
||||
from numpy.array_api import trunc
|
||||
|
||||
import Constant
|
||||
from COM.COM_TCP import TCPClient
|
||||
import queue
|
||||
@ -43,11 +45,17 @@ class RobotClient(TCPClient):
|
||||
def send_Command(self):
|
||||
try:
|
||||
if self.command_quene.qsize()!=0:
|
||||
log.log_message(logging.INFO, f'robot-command:从队列获取命令')
|
||||
command = self.command_quene.get()
|
||||
log.log_message(logging.INFO, f'robot-command:{command}')
|
||||
self.client_socket.send(command.encode())
|
||||
if True:
|
||||
response = self.client_socket.recv(1024).decode('utf-8')
|
||||
# response_message = json.loads(response)
|
||||
if response:
|
||||
log.log_message(logging.INFO, f'robot-command:{response},剩余:{self.command_quene.qsize()}条命令')
|
||||
else:
|
||||
log.log_message(logging.INFO, f'robot-command:无返回值,剩余:{self.command_quene.qsize()}条命令')
|
||||
return True
|
||||
else:
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user