|
@@ -5,6 +5,7 @@ import Gauge from '@/components/gauge.vue'
|
|
|
import Record from '@/components/record.vue'
|
|
import Record from '@/components/record.vue'
|
|
|
import Battery from '@/components/battery.vue'
|
|
import Battery from '@/components/battery.vue'
|
|
|
import Loading from '@/components/loading.vue'
|
|
import Loading from '@/components/loading.vue'
|
|
|
|
|
+import Signal from '@/components/signal.vue'
|
|
|
|
|
|
|
|
const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms))
|
|
const sleep = (ms: number) => new Promise((res) => setTimeout(res, ms))
|
|
|
const iceServers = [
|
|
const iceServers = [
|
|
@@ -35,6 +36,7 @@ const conctrlAnimation = ref(0)
|
|
|
const conctrlGrears = ref(false)
|
|
const conctrlGrears = ref(false)
|
|
|
const conctrlNum = ref(0)
|
|
const conctrlNum = ref(0)
|
|
|
const SpeedValue = ref(0)
|
|
const SpeedValue = ref(0)
|
|
|
|
|
+const signalValue = ref(0)
|
|
|
|
|
|
|
|
// 发送控制数据
|
|
// 发送控制数据
|
|
|
function sendContrlData() {
|
|
function sendContrlData() {
|
|
@@ -170,9 +172,13 @@ window.$electron.on('message', async (msg: any) => {
|
|
|
console.log('电量', msg.power)
|
|
console.log('电量', msg.power)
|
|
|
break
|
|
break
|
|
|
case 'speed':
|
|
case 'speed':
|
|
|
- SpeedValue.value = Math.floor(msg.data)
|
|
|
|
|
|
|
+ SpeedValue.value = Math.floor(msg.speed)
|
|
|
console.log('速度')
|
|
console.log('速度')
|
|
|
break
|
|
break
|
|
|
|
|
+ case 'signal':
|
|
|
|
|
+ signalValue.value = Math.floor(msg.signal)
|
|
|
|
|
+ console.log('信号')
|
|
|
|
|
+ break
|
|
|
case 'contrl':
|
|
case 'contrl':
|
|
|
{
|
|
{
|
|
|
const db = msg.content
|
|
const db = msg.content
|
|
@@ -241,6 +247,8 @@ onUnmounted(() => close())
|
|
|
/>
|
|
/>
|
|
|
<!-- 电量状态 -->
|
|
<!-- 电量状态 -->
|
|
|
<Battery :quantity="quantity" />
|
|
<Battery :quantity="quantity" />
|
|
|
|
|
+
|
|
|
|
|
+ <Signal :signal-value="signalValue" />
|
|
|
</div>
|
|
</div>
|
|
|
<div class="marke-right">
|
|
<div class="marke-right">
|
|
|
<Icon
|
|
<Icon
|