|
@@ -21,8 +21,8 @@ class McuDeviationSet:
|
|
|
self.last_value = defaultdict(float)
|
|
self.last_value = defaultdict(float)
|
|
|
is_debug = True if settings.IS_DEBUG == "true" else False
|
|
is_debug = True if settings.IS_DEBUG == "true" else False
|
|
|
self.mcu_debug = McuDebug(mcu, is_debug=is_debug, is_deviation=False)
|
|
self.mcu_debug = McuDebug(mcu, is_debug=is_debug, is_deviation=False)
|
|
|
- loop = asyncio.get_event_loop()
|
|
|
|
|
- loop.create_task(self.get_mcu_deviation(), name="get_mcu_deviation")
|
|
|
|
|
|
|
+ # loop = asyncio.get_event_loop()
|
|
|
|
|
+ self.get_mcu_deviation()
|
|
|
# # 运动到设定位
|
|
# # 运动到设定位
|
|
|
# QTimer.singleShot(2500, self.init_pos)
|
|
# QTimer.singleShot(2500, self.init_pos)
|
|
|
|
|
|
|
@@ -236,8 +236,7 @@ class McuDeviationSet:
|
|
|
self.mcu.to_init_device_origin_point(device_name="mcu", is_force=True)
|
|
self.mcu.to_init_device_origin_point(device_name="mcu", is_force=True)
|
|
|
|
|
|
|
|
async def get_mcu_deviation(self):
|
|
async def get_mcu_deviation(self):
|
|
|
- await self.mcu.getDeviationInfo()
|
|
|
|
|
-
|
|
|
|
|
|
|
+ asyncio.run(self.mcu.getDeviationInfo())
|
|
|
def get_mcu_deviation_info(self, data):
|
|
def get_mcu_deviation_info(self, data):
|
|
|
if "_type" not in data:
|
|
if "_type" not in data:
|
|
|
return
|
|
return
|