【类 型】:fix 指点飞行命令发送失败
【原 因】:此模块没引用mqtt 【过 程】: 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
caa837daf8
commit
b9f9c1de91
@ -35,6 +35,7 @@ import MapBox from '@/components/MapBox'
|
|||||||
import ControllerTabs from '@/components/ControllerTabs'
|
import ControllerTabs from '@/components/ControllerTabs'
|
||||||
import BatteryStatus from '@/components/BatteryStatus'
|
import BatteryStatus from '@/components/BatteryStatus'
|
||||||
import PlaneStatus from '@/components/PlaneStatus'
|
import PlaneStatus from '@/components/PlaneStatus'
|
||||||
|
import mqtt from '@/utils/mqtt'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Planes',
|
name: 'Planes',
|
||||||
@ -138,6 +139,17 @@ export default {
|
|||||||
*/
|
*/
|
||||||
mapXOffset (x, y) {
|
mapXOffset (x, y) {
|
||||||
this.$refs.mapbox.mapXOffset(x, y)
|
this.$refs.mapbox.mapXOffset(x, y)
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @description: 发布 mqtt 信息
|
||||||
|
* @param {*} jsonData {'item':val} // item: questAss飞行航点任务 setQuestState 设置飞机状态 resetQuestState设置飞机初始状态 chan1油门通道1 chan2油门通道2 chan3油门通道3 chan4油门通道4 hookConteroller钩子控制 cameraController云台相机控制
|
||||||
|
*/
|
||||||
|
publishFun (jsonData) {
|
||||||
|
if (this.plane) {
|
||||||
|
mqtt.publishFun(`cmd/${this.plane.macadd}`, jsonData)
|
||||||
|
} else {
|
||||||
|
this.$message.warning('与飞机通信未接通,请稍后')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
Loading…
Reference in New Issue
Block a user