Compare commits
3 Commits
8a46458f38
...
0149d4be59
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0149d4be59 | ||
![]() |
add4af2a4b | ||
![]() |
3b1ca3619b |
@ -93,7 +93,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
this.rtlRemainingPower += 10
|
this.rtlRemainingPower += 0
|
||||||
}, 1)
|
}, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,7 +407,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 发布 mqtt 信息
|
* @description: 发布 mqtt 信息
|
||||||
* @param {*} jsonData {'item':val} // item: questAss飞行航点任务 setPlaneState 设置飞机状态 getPlaneState获取飞机状态 resetState设置飞机初始状态 chan1油门通道1 chan2油门通道2 chan3油门通道3 chan4油门通道4 hookConteroller钩子控制 cameraController云台相机控制
|
* @param {*} jsonData {'item':val} // item: questAss飞行航点任务 setPlaneState 设置飞机状态 resetState设置飞机初始状态 chan1油门通道1 chan2油门通道2 chan3油门通道3 chan4油门通道4 hookConteroller钩子控制 cameraController云台相机控制
|
||||||
*/
|
*/
|
||||||
publishFun (jsonData) {
|
publishFun (jsonData) {
|
||||||
if (this.plane) {
|
if (this.plane) {
|
||||||
@ -529,8 +529,6 @@ export default {
|
|||||||
routeData = JSON.stringify(routeData)// 重新序列化
|
routeData = JSON.stringify(routeData)// 重新序列化
|
||||||
// 发送航点信息主题
|
// 发送航点信息主题
|
||||||
this.publishFun(routeData)
|
this.publishFun(routeData)
|
||||||
// 主动获取飞机状态
|
|
||||||
this.publishFun('{getPlaneState:1}')
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$message.error('操作失败,航线异常')
|
this.$message.error('操作失败,航线异常')
|
||||||
}
|
}
|
||||||
@ -591,8 +589,6 @@ export default {
|
|||||||
this.publishFun(routeData)// 发送航点信息主题
|
this.publishFun(routeData)// 发送航点信息主题
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 主动获取飞机状态
|
|
||||||
this.publishFun('{getPlaneState:1}')
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 匹配声音航点字符串 比如$food_sn$ food_sn匹配成 送餐订单里面的对应字段
|
* @description: 匹配声音航点字符串 比如$food_sn$ food_sn匹配成 送餐订单里面的对应字段
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<!-- 锁定状态 -->
|
<!-- 锁定状态 -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="tag flex mac mc iconfont" :class="isLockState ? 'icon-suoding' : 'icon-jiesuo'">
|
<div class="tag flex mac mc iconfont" :class="isLockState ? 'icon-suoding' : 'icon-jiesuo'">
|
||||||
|
{{ plane.planeState.state }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 飞机模式 -->
|
<!-- 飞机模式 -->
|
||||||
@ -19,24 +20,28 @@
|
|||||||
<!-- 卫星 -->
|
<!-- 卫星 -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="tag flex mac mc iconfont icon-weixing">
|
<div class="tag flex mac mc iconfont icon-weixing">
|
||||||
|
{{ plane.planeState.fixType }}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class=" tag flex mac mc f-s-16">
|
<div class=" tag flex mac mc f-s-16">
|
||||||
{{ satCount }}颗
|
{{ satCount }}颗
|
||||||
</div> -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 电池电压 -->
|
<!-- 电池电压 -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="tag flex mac mc iconfont icon-dianya1">
|
<div class="tag flex mac mc iconfont icon-dianya1">
|
||||||
|
{{ plane.planeState.voltagBattery }}V
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 电池电流 -->
|
<!-- 电池电流 -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="tag flex mac mc iconfont icon-dianliu">
|
<div class="tag flex mac mc iconfont icon-dianliu">
|
||||||
|
{{ plane.planeState.currentBattery }}A
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 飞机高度 -->
|
<!-- 飞机高度 -->
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="tag flex mac mc iconfont icon-gaodu">
|
<div class="tag flex mac mc iconfont icon-gaodu">
|
||||||
|
{{ plane.planeState.battCapacity }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 飞机对地速度 -->
|
<!-- 飞机对地速度 -->
|
||||||
|
@ -286,7 +286,8 @@ const store = new Vuex.Store({
|
|||||||
loadweight: null, // 重量
|
loadweight: null, // 重量
|
||||||
hookstatus: null, // 钩子状态
|
hookstatus: null, // 钩子状态
|
||||||
position: [], // [[经度,维度,海拔高度]]累计数组
|
position: [], // [[经度,维度,海拔高度]]累计数组
|
||||||
battCapacity: null// 电池容量
|
battCapacity: null, // 电池容量
|
||||||
|
homePosition: null // 返航点位置
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (res.data.status === 1) {
|
if (res.data.status === 1) {
|
||||||
|
@ -107,9 +107,6 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
plane (val) {
|
plane (val) {
|
||||||
this.makePlane(val)// 有飞机数据之后 在地图上创建飞机
|
this.makePlane(val)// 有飞机数据之后 在地图上创建飞机
|
||||||
if (!val.planeState.battCapacity) {
|
|
||||||
mqtt.publishFun(`cmd/${this.plane.macadd}`, '{"getBattCapacity":1}')// 发送设置飞机状态主题 请求飞控返回 电池总容量
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* @description: 更新飞机位置 并画出轨迹 跟随飞机
|
* @description: 更新飞机位置 并画出轨迹 跟随飞机
|
||||||
|
@ -102,14 +102,6 @@ export default {
|
|||||||
if (plane.planeState.position.length > 1000) {
|
if (plane.planeState.position.length > 1000) {
|
||||||
plane.planeState.position.shift() // 删除最早的经纬度
|
plane.planeState.position.shift() // 删除最早的经纬度
|
||||||
}
|
}
|
||||||
} else if (key === 'parameter') {
|
|
||||||
// 如果是 get飞控参数 判断设置对应值
|
|
||||||
const parameter = JSON.parse(jsonData.parameter.trim())
|
|
||||||
for (const k in parameter) {
|
|
||||||
if (k === 'BATT_CAPACITY') {
|
|
||||||
plane.planeState.battCapacity = parameter.BATT_CAPACITY
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
plane.planeState[key] = jsonData[key] // 按订阅信息 刷新飞机状态
|
plane.planeState[key] = jsonData[key] // 按订阅信息 刷新飞机状态
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user