|
|
@@ -1,7 +1,7 @@
|
|
|
from collections import defaultdict
|
|
|
from .McuDebug import McuDebug
|
|
|
from functools import partial
|
|
|
-import time
|
|
|
+import time, asyncio
|
|
|
import settings
|
|
|
|
|
|
|
|
|
@@ -164,7 +164,7 @@ class McuDeviationSet:
|
|
|
return True
|
|
|
|
|
|
def change_value(self, value, name):
|
|
|
- value = round(value, 2)
|
|
|
+ value = round(float(value), 2)
|
|
|
print("change_value===>", value, name)
|
|
|
if name == "相机电机":
|
|
|
self.mcu_debug.camera_high_motor(value=value)
|
|
|
@@ -234,7 +234,8 @@ class McuDeviationSet:
|
|
|
self.mcu.to_init_device_origin_point(device_name="mcu", is_force=True)
|
|
|
|
|
|
def get_mcu_deviation(self):
|
|
|
- self.mcu.get_deviation()
|
|
|
+ loop = asyncio.get_event_loop()
|
|
|
+ loop.create_task(self.mcu.get_deviation(), name="get_mcu_deviation")
|
|
|
|
|
|
def get_mcu_deviation_info(self, data):
|
|
|
if "_type" not in data:
|