|
@@ -261,12 +261,16 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
|
|
|
|
|
async def getDeviationInfo(self):
|
|
async def getDeviationInfo(self):
|
|
|
await asyncio.sleep(0.01)
|
|
await asyncio.sleep(0.01)
|
|
|
- # 发送获取偏移量
|
|
|
|
|
- data = [self.command["get_deviation"], 1]
|
|
|
|
|
- self.add_send_data_queue(data)
|
|
|
|
|
- # if self.serial_ins:
|
|
|
|
|
- # self.serial_ins.write_cmd(data)
|
|
|
|
|
- print("发送获取偏移量")
|
|
|
|
|
|
|
+ try:
|
|
|
|
|
+ # 发送获取偏移量
|
|
|
|
|
+ data = [self.command["get_deviation"], 1]
|
|
|
|
|
+ self.add_send_data_queue(data)
|
|
|
|
|
+ # if self.serial_ins:
|
|
|
|
|
+ # self.serial_ins.write_cmd(data)
|
|
|
|
|
+ print("发送获取偏移量")
|
|
|
|
|
+ except Exception as e:
|
|
|
|
|
+ print(e)
|
|
|
|
|
+ print("getDeviationInfo", "暂未获取到self.command")
|
|
|
|
|
|
|
|
def set_deviation(self, device_name, _type=0, deviation=0):
|
|
def set_deviation(self, device_name, _type=0, deviation=0):
|
|
|
# turntable----0 angle_ratio 1 turntable_steering_deviation
|
|
# turntable----0 angle_ratio 1 turntable_steering_deviation
|