|
@@ -127,6 +127,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
90: self.get_from_mcu_connect_info, # 获取链接电脑信号
|
|
90: self.get_from_mcu_connect_info, # 获取链接电脑信号
|
|
|
92: self.get_from_mcu_move_respond_data, # 获取MCU响应
|
|
92: self.get_from_mcu_move_respond_data, # 获取MCU响应
|
|
|
100: self.print_mcu_error_data, # 打印下位机的错误内容
|
|
100: self.print_mcu_error_data, # 打印下位机的错误内容
|
|
|
|
|
+ 255: self.print_mcu_noraml_data, # 打印回执
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async def sendCommand(self, command):
|
|
async def sendCommand(self, command):
|
|
@@ -450,7 +451,16 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
print("117 error {}".format(e))
|
|
print("117 error {}".format(e))
|
|
|
logger.info("117 error %s", e)
|
|
logger.info("117 error %s", e)
|
|
|
return
|
|
return
|
|
|
-
|
|
|
|
|
|
|
+ def print_mcu_noraml_data(self, receive_data):
|
|
|
|
|
+ # 扫码数据
|
|
|
|
|
+ try:
|
|
|
|
|
+ receive_data_temp_text = " ".join([hex(x) for x in receive_data])
|
|
|
|
|
+ print("255 print_mcu_noraml_data:", receive_data_temp_text)
|
|
|
|
|
+ logger.info("255 print_mcu_noraml_data:%s", receive_data_temp_text)
|
|
|
|
|
+ except BaseException as e:
|
|
|
|
|
+ print("255 error {}".format(e))
|
|
|
|
|
+ logger.info("255 error %s", e)
|
|
|
|
|
+ return
|
|
|
def get_from_mcu_move_respond_data(self, receive_data):
|
|
def get_from_mcu_move_respond_data(self, receive_data):
|
|
|
self.last_from_mcu_move_respond_data = receive_data
|
|
self.last_from_mcu_move_respond_data = receive_data
|
|
|
|
|
|