diff --git a/docker/a_th_web/conf/nginx.conf b/docker/a_th_web/conf/nginx.conf index e528be4..21ec97f 100644 --- a/docker/a_th_web/conf/nginx.conf +++ b/docker/a_th_web/conf/nginx.conf @@ -14,6 +14,10 @@ http { listen 80; server_name localhost; + location /waypoint/ { + root /home/ruoyi/projects/ruoyi-ui; + } + location / { root /home/ruoyi/projects/ruoyi-ui; try_files $uri $uri/ /index.html; diff --git a/docker/a_th_web/dockerfile b/docker/a_th_web/dockerfile index df3f9c9..dd4d098 100644 --- a/docker/a_th_web/dockerfile +++ b/docker/a_th_web/dockerfile @@ -13,3 +13,5 @@ WORKDIR /home/ruoyi/projects/ruoyi-ui COPY ./conf/nginx.conf /etc/nginx/nginx.conf # 复制html文件到路径 COPY ./html/dist /home/ruoyi/projects/ruoyi-ui +# 复制waypoint文件到路径 +COPY ./waypoint/default.waypoints /home/ruoyi/projects/ruoyi-ui/waypoint/default.waypoints diff --git a/docker/a_th_web/waypoint/default.waypoints b/docker/a_th_web/waypoint/default.waypoints new file mode 100644 index 0000000..2a422d2 --- /dev/null +++ b/docker/a_th_web/waypoint/default.waypoints @@ -0,0 +1,3 @@ +QGC WPL 110 +0 1 0 16 0 0 0 0 31.8293035 118.7635779 100.000000 1 +1 0 3 22 0.00000000 0.00000000 0.00000000 0.00000000 31.82938020 118.76653610 100.000000 1 diff --git a/ruoyi-api/tuoheng-api-device/src/main/java/com/ruoyi/device/api/RemoteAircraftFlyService.java b/ruoyi-api/tuoheng-api-device/src/main/java/com/ruoyi/device/api/RemoteAircraftFlyService.java index e5b27a8..978e482 100644 --- a/ruoyi-api/tuoheng-api-device/src/main/java/com/ruoyi/device/api/RemoteAircraftFlyService.java +++ b/ruoyi-api/tuoheng-api-device/src/main/java/com/ruoyi/device/api/RemoteAircraftFlyService.java @@ -105,4 +105,13 @@ public interface RemoteAircraftFlyService */ @PostMapping("/drone/cover-close/{sn}") R coverClose(@PathVariable("sn") String sn); + + /** + * 无人机返航接口 + * + * @param sn 机场SN号 + * @return 返航响应 + */ + @PostMapping("/drone/return-home/{sn}") + R returnHome(@PathVariable("sn") String sn); } \ No newline at end of file