指点飞行后云台角度垂直向下

main
刘妍 2025-10-20 13:51:18 +08:00
parent b12f7510df
commit 77de45b49b
1 changed files with 28 additions and 2 deletions

View File

@ -22,8 +22,8 @@
<div class="content"> <div class="content">
<div class="content-button"> <div class="content-button">
<a-button @click="takeOff"></a-button> <a-button @click="takeOff"></a-button>
<a-button @click="flyTo"></a-button>
<!-- <a-button>智能环绕</a-button> --> <!-- <a-button>智能环绕</a-button> -->
<a-button @click="flyTo"></a-button>
<a-button @click="returnVoyage"></a-button> <a-button @click="returnVoyage"></a-button>
<!-- <a-button @click="obtain" style="background-color: #1b71e8; border: none"> <!-- <a-button @click="obtain" style="background-color: #1b71e8; border: none">
<template #icon v-if="flightGrab"> <template #icon v-if="flightGrab">
@ -168,7 +168,11 @@
} from '@/utils/mqtt'; } from '@/utils/mqtt';
import { CloseOutlined, CheckOutlined } from '@ant-design/icons-vue'; import { CloseOutlined, CheckOutlined } from '@ant-design/icons-vue';
import { vDrag } from '@/utils/drag'; import { vDrag } from '@/utils/drag';
import { drcDownTopicReize, eventsTopicSubscribeReize } from '@/utils/debugging/events'; import {
drcDownTopicReize,
eventsTopicSubscribeReize,
servicesTopicReize,
} from '@/utils/debugging/events';
import { import {
servicesTopic, servicesTopic,
services_replyTopic, services_replyTopic,
@ -289,6 +293,14 @@
createMessage.warning('飞行器未开机'); createMessage.warning('飞行器未开机');
return; return;
} }
if (!flightGrab.value) {
createMessage.warning('请先获取飞行器控制权');
return;
}
if (!modeEnter.value) {
createMessage.warning('请先进入指令飞行控制');
return;
}
emits('clickFlyTo'); emits('clickFlyTo');
}; };
// //
@ -721,6 +733,20 @@
if (rs.data.result == 0) { if (rs.data.result == 0) {
createMessage.success('指点飞行成功'); createMessage.success('指点飞行成功');
EventBus.emit('closeTranslation', null); EventBus.emit('closeTranslation', null);
//
const querys = {
bid: buildGUID(),
method: 'camera_screen_drag',
tid: buildGUID(),
timestamp: new Date().getTime(),
data: {
payload_index: uav.camera_index,
locked: true,
pitch_speed: -180,
yaw_speed: 0,
},
};
servicesTopicReize(querys);
} else { } else {
createMessage.error('指点飞行失败,' + errorName(rs.data.result)); createMessage.error('指点飞行失败,' + errorName(rs.data.result));
} }