Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
25bc5ea88a
@ -2,6 +2,11 @@
|
||||
"apiType": 'stageMode',
|
||||
"buildOption": {
|
||||
"externalNativeOptions": {
|
||||
"abiFilters": [
|
||||
"arm64-v8a",
|
||||
"armeabi-v7a",
|
||||
"x86_64"
|
||||
],
|
||||
"path": "./src/main/cpp/CMakeLists.txt",
|
||||
"arguments": "",
|
||||
"cppFlags": "",
|
||||
|
||||
@ -82,6 +82,7 @@ export default class UdpByOne {
|
||||
address: this.OppositeIp,
|
||||
port: parseInt(this.PLCOppositeIpPort),
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
@ -122,7 +123,7 @@ export default class UdpByOne {
|
||||
let GPGGAMsgArr = GPGGAMatch ? GPGGAMatch[0]?.split(",").slice(0, 15) : [];
|
||||
// 使用正则提取$GPRMC消息
|
||||
let GPRMCMatch = this.GPSMsg.match(/\$GPRMC[^$]*/);
|
||||
let GPRMCMsgArr = GPRMCMatch ? GPRMCMatch?.split(",").slice(0, 14) : [];
|
||||
let GPRMCMsgArr = GPRMCMatch ? GPRMCMatch[0]?.split(",").slice(0, 14) : [];
|
||||
// 使用正则表达式提取$GPGST消息
|
||||
let GPGSTMatch = this.GPSMsg.match(/\$GPGST[^$]*/);
|
||||
let GPGSTMsgArr = GPGSTMatch ? GPGSTMatch[0]?.split(",").slice(0, 9) : [];
|
||||
@ -130,11 +131,6 @@ export default class UdpByOne {
|
||||
let PTNLMatch = this.GPSMsg.match(/\$PTNL[^$]*/);
|
||||
let PTNLMsgArr = PTNLMatch ? PTNLMatch[0].split(",")?.slice(0, 14) : [];
|
||||
|
||||
if(GPGGAMsgArr.length == 0 || GPRMCMsgArr.length ==0 || GPGSTMsgArr.length ==0 || PTNLMsgArr.length ==0){
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
// 组合GPS数据
|
||||
// 状态83
|
||||
newMessage[83] = GPGGAMsgArr[6];
|
||||
@ -277,7 +273,9 @@ export default class UdpByOne {
|
||||
// 已工作时长/设定的工作时长 61
|
||||
// 改正数数据长度*数据长度-基准站RTCM改正数类型 62
|
||||
}
|
||||
return newMessage.join(",")
|
||||
return newMessage.map(i=>{
|
||||
return i === undefined?'':i
|
||||
}).join(",")
|
||||
}
|
||||
|
||||
// PLC接收消息
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import socket from '@ohos.net.socket';
|
||||
import hilog from '@ohos.hilog';
|
||||
import { getTCP } from './GlobalTcp';
|
||||
import prompt from '@ohos.prompt';
|
||||
import FileUtil from './File';
|
||||
import { dateFormat } from './tools';
|
||||
|
||||
import Prompt from '@system.prompt';
|
||||
const TAG = 'socketTag[TcpDemo.TcpClient]'
|
||||
|
||||
export default class TcpClient {
|
||||
@ -187,7 +186,7 @@ export default class TcpClient {
|
||||
if (globalThis.tcpUdpError) {
|
||||
console.log(TAG,'tcp信号丢失')
|
||||
// getTCP()
|
||||
prompt.showToast({
|
||||
Prompt.showToast({
|
||||
message: 'tcp信号丢失',
|
||||
duration: 2000
|
||||
});
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||
"specifiers": {
|
||||
"@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6"
|
||||
},
|
||||
"packages": {
|
||||
"@ohos/hypium@1.0.6": {
|
||||
"resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
|
||||
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ=="
|
||||
"resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz",
|
||||
"integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==",
|
||||
"registryType": "ohpm",
|
||||
"shasum": "3f5fed65372633233264b3447705b0831dfe7ea1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user