指点飞行后云台角度垂直向下
parent
b12f7510df
commit
77de45b49b
|
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue