From 8d9a2d656e4ae007590c622e5f7c228adacdca49 Mon Sep 17 00:00:00 2001
From: rain <167982779@qq.com>
Date: Fri, 14 Jun 2024 10:11:36 +0800
Subject: [PATCH] 统一风格

---
 src/main/java/com/dji/sample/control/service/IControlService.java |   83 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 79 insertions(+), 4 deletions(-)

diff --git a/src/main/java/com/dji/sample/control/service/IControlService.java b/src/main/java/com/dji/sample/control/service/IControlService.java
index f04c138..1c7485d 100644
--- a/src/main/java/com/dji/sample/control/service/IControlService.java
+++ b/src/main/java/com/dji/sample/control/service/IControlService.java
@@ -2,8 +2,12 @@
 
 import com.dji.sample.common.model.ResponseResult;
 import com.dji.sample.component.mqtt.model.CommonTopicReceiver;
-import com.dji.sample.control.model.param.RemoteDebugParam;
+import com.dji.sample.control.model.enums.DroneAuthorityEnum;
+import com.dji.sample.control.model.param.*;
+import com.dji.sample.wayline.model.param.PointPOJO;
 import org.springframework.messaging.MessageHeaders;
+
+import java.util.List;
 
 /**
  * @author sean
@@ -19,13 +23,84 @@
      * @param param
      * @return
      */
-    ResponseResult controlDock(String sn, String serviceIdentifier, RemoteDebugParam param);
+    ResponseResult controlDockDebug(String sn, String serviceIdentifier, RemoteDebugParam param);
 
     /**
-     * Handles multi-state command progress information.
+     * Make the drone fly to the target point.
+     * @param sn
+     * @param param
+     * @return
+     */
+    ResponseResult flyToPoint(String sn, FlyToPointParam param);
+
+    /**
+     * End the mission of flying the drone to the target point.
+     * @param sn
+     * @return
+     */
+    ResponseResult flyToPointStop(String sn);
+
+    /**
+     * Handle progress result notifications for fly to target point.
      * @param receiver
      * @param headers
+     * @return
      */
-    void handleControlProgress(CommonTopicReceiver receiver, MessageHeaders headers);
+    CommonTopicReceiver handleFlyToPointProgress(CommonTopicReceiver receiver, MessageHeaders headers) throws Exception;
+
+    /**
+     * Control the drone to take off.
+     * @param sn
+     * @param param
+     * @return
+     */
+    ResponseResult takeoffToPoint(String sn, TakeoffToPointParam param);
+
+    /**
+     * Handle progress result notifications for takeoff to target point.
+     * @param receiver
+     * @param headers
+     * @return
+     */
+    CommonTopicReceiver handleTakeoffToPointProgress(CommonTopicReceiver receiver, MessageHeaders headers);
+
+    /**
+     * Seize the control authority of the drone or the payload control authority.
+     * 抢占无人机控制权限或有效载荷控制权限
+     * @param sn
+     * @param authority
+     * @param param
+     * @return
+     */
+    ResponseResult seizeAuthority(String sn, DroneAuthorityEnum authority, DronePayloadParam param);
+
+    /**
+     * Control the payload of the drone.
+     * @param param
+     * @return
+     */
+    ResponseResult payloadCommands(PayloadCommandsParam param) throws Exception;
+
+    ResponseResult requestsConfig(String sn,String method, RequestsParam param);
+
+    /**
+     * 拍照
+     * @param sn
+     * @param payloadIndex
+     * @return
+     * @throws Exception
+     */
+     ResponseResult takePhoto(String sn,String payloadIndex) throws Exception;
+
+    /**
+     * 飞向下一个目标点
+     * @param targetList 目标点集合
+     * @param curIndex 当前飞行点索引
+     * @param sn
+     * @param payloadIndex 负载
+     * @return
+     * @throws Exception
+     */
+     ResponseResult flyToNextPoint(List<PointPOJO> targetList, int curIndex, String sn, String payloadIndex) throws Exception;
 
 }

--
Gitblit v1.9.3