From 98180a4c68af00a2bd9f2f63f59f95712cfa33f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E5=BF=97=E8=B6=85?= Date: Thu, 12 May 2022 15:34:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=98=9F=E5=BA=A7=E5=9B=BE=E4=B8=AD?= =?UTF-8?q?=E8=BD=BD=E5=99=AA=E6=AF=94=E4=B8=BA0=E7=9A=84=E5=8D=AB?= =?UTF-8?q?=E6=98=9F=E9=A2=9C=E8=89=B2=E5=8F=98=E4=B8=BA=E7=81=B0=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/main/load-serialport.js | 1 + src/render/components/PlanisphereView.vue | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 3f622f2..65fb37e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "gnss-tool-kit", "description": "gnss-tool-kit", "author": "hwasmart", - "version": "0.0.0", + "version": "2.0.0", "main": "dist/main/app.js", "scripts": { "dev": "vite", diff --git a/src/main/load-serialport.js b/src/main/load-serialport.js index a86c379..172170f 100644 --- a/src/main/load-serialport.js +++ b/src/main/load-serialport.js @@ -53,6 +53,7 @@ SerialPort.list().then((ports, err) => { try { const { path, baudRate } = getSerialPortConstructorArguments(ports) + console.log(path, baudRate, '=====================') const serialPort = new SerialPort(path, { baudRate }) const parser = serialPort.pipe(new InterByteTimeout({interval: 30})) diff --git a/src/render/components/PlanisphereView.vue b/src/render/components/PlanisphereView.vue index 80d5a76..0ee2098 100644 --- a/src/render/components/PlanisphereView.vue +++ b/src/render/components/PlanisphereView.vue @@ -82,7 +82,7 @@ const option = reactive({ formatter: '{@[2]}' }, itemStyle: { - color: props.color + color: ({ data } : any) => data[3] > 0 ? props.color : '#ccc' }, }, { nmea: 'in-positioning', @@ -95,7 +95,7 @@ const option = reactive({ formatter: '{@[2]}' }, itemStyle: { - color: props.color + color: ({ data } : any) => data[3] > 0 ? props.color : '#ccc' }, }] }) @@ -113,11 +113,11 @@ const getPlanisphereOption = (GSVArr: Array, GSAArr: Array) => { const in_positioning_id = get_in_positioning_id(GSAArr) GSVArr.forEach(({ satellites }) => { - satellites.forEach(({ id, elevationDeg, azimuthTrue }) => { + satellites.forEach(({ id, elevationDeg, azimuthTrue, SNRdB }) => { if (in_positioning_id.indexOf(parseInt(id)) < 0) { - un_positioning_data.push([parseInt(elevationDeg) * -1, azimuthTrue, id]) + un_positioning_data.push([parseInt(elevationDeg) * -1, azimuthTrue, id, SNRdB]) } else { - in_positioning_data.push([parseInt(elevationDeg) * -1, azimuthTrue, id]) + in_positioning_data.push([parseInt(elevationDeg) * -1, azimuthTrue, id, SNRdB]) } }); });