From 91f6e60919b92b7f99a41f2ddeb42df17cd0c487 Mon Sep 17 00:00:00 2001
From: liusuyi <1951119284@qq.com>
Date: Fri, 25 Oct 2024 10:48:26 +0800
Subject: [PATCH] 优化

---
 ard-work/src/main/java/com/ard/tianyu/service/impl/TyServiceImpl.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/ard-work/src/main/java/com/ard/tianyu/service/impl/TyServiceImpl.java b/ard-work/src/main/java/com/ard/tianyu/service/impl/TyServiceImpl.java
index 278e324..b9f8059 100644
--- a/ard-work/src/main/java/com/ard/tianyu/service/impl/TyServiceImpl.java
+++ b/ard-work/src/main/java/com/ard/tianyu/service/impl/TyServiceImpl.java
@@ -18,8 +18,6 @@
 import com.ard.tianyu.netty.command.*;
 import com.ard.tianyu.netty.TyNettyTcpClient;
 import com.ard.tianyu.service.ITyService;
-import io.netty.buffer.ByteBuf;
-import io.netty.buffer.Unpooled;
 import io.netty.channel.Channel;
 import io.netty.channel.ChannelFuture;
 import lombok.extern.slf4j.Slf4j;
@@ -153,9 +151,14 @@
      * 云台控制基于角度
      */
     @Override
-    public void controlAngle(String boxSn, Integer actionId, Integer rotationAngle) {
+    public void angleControl(String boxSn, Integer actionId, Integer rotationAngle) {
         ControlAngleCommand controlAngleCommand = new ControlAngleCommand(boxSn, actionId.byteValue(), rotationAngle.byteValue());
         this.sendMessage(tyConfiguration.getIpPort(), controlAngleCommand);
+    }
+
+    @Override
+    public void absAngleControl(String boxSn, Integer actionId, float pitch, float yaw, float roll) {
+
     }
 
     /**
@@ -230,9 +233,9 @@
                 break;
             case (byte) 0xD1:
                 // 处理无人机
-                DroneReadyNotificationCommand droneReadyNotificationCommand = (DroneReadyNotificationCommand) tyCommand;
+                UavReadyNotificationCommand droneReadyNotificationCommand = (UavReadyNotificationCommand) tyCommand;
                 if (droneReadyNotificationCommand.getActionCode() == (byte) 0x42) {
-                    UavInitInfoCommand uavInitCommand = new UavInitInfoCommand(new String(droneReadyNotificationCommand.getBoxSn()), (byte) 0x42);
+                    UavInitInfoCommand uavInitCommand = new UavInitInfoCommand(droneReadyNotificationCommand.getBoxSn());
                     this.sendMessage(tyConfiguration.getIpPort(), uavInitCommand);
                     log.info("收到无人机初始化详情-回复防止再次发送");
                 }

--
Gitblit v1.9.3