udp修改
This commit is contained in:
parent
46d3eb2f71
commit
ade3486e8e
@ -2,6 +2,7 @@ import router from '@ohos.router';
|
|||||||
import RealTime from '../compontents/judge/RealTime';
|
import RealTime from '../compontents/judge/RealTime';
|
||||||
import { GPSData, SignalData } from '../../mock';
|
import { GPSData, SignalData } from '../../mock';
|
||||||
import { SignalDataType } from '../../model';
|
import { SignalDataType } from '../../model';
|
||||||
|
import { ObtainSignalData } from '../../utils/business/ObtainSignalData';
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
export default struct SignDisplayCom {
|
export default struct SignDisplayCom {
|
||||||
@ -332,12 +333,12 @@ export default struct SignDisplayCom {
|
|||||||
|
|
||||||
if (showBack) {
|
if (showBack) {
|
||||||
this.ratio = 1.4
|
this.ratio = 1.4
|
||||||
globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => {
|
ObtainSignalData.getData((msg)=>{
|
||||||
console.log('getUDPonMessage_1bysignDisplay0', msg)
|
if (msg) {
|
||||||
if (msg) {
|
getSignal(msg)
|
||||||
getSignal(msg)
|
}
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
clearInterval(this.signalTimer)
|
clearInterval(this.signalTimer)
|
||||||
this.signalTimer = setInterval(() => {
|
this.signalTimer = setInterval(() => {
|
||||||
@ -351,16 +352,14 @@ export default struct SignDisplayCom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onPageShow() {
|
onPageShow() {
|
||||||
console.info('SURENJUN', 123)
|
|
||||||
|
|
||||||
const getSignal = this.getSignal;
|
const getSignal = this.getSignal;
|
||||||
const that = this
|
const that = this
|
||||||
const showBack = this.showBack;
|
const showBack = this.showBack;
|
||||||
if (showBack) {
|
if (showBack) {
|
||||||
globalThis.udpClient.onMessage_1 && globalThis.udpClient.onMessage_1((msg) => {
|
ObtainSignalData.getData((msg)=>{
|
||||||
console.log('getUDPonMessage_1bysignDisplay2', msg)
|
if (msg) {
|
||||||
|
getSignal(msg)
|
||||||
getSignal(msg)
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
clearInterval(this.signalTimer)
|
clearInterval(this.signalTimer)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
"meta": {
|
"meta": {
|
||||||
"stableOrder": true
|
"stableOrder": true
|
||||||
},
|
},
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 1,
|
||||||
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
"ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
|
||||||
"specifiers": {
|
"specifiers": {
|
||||||
"@ohos/crypto-js@2.0.3": "@ohos/crypto-js@2.0.3",
|
"@ohos/crypto-js@2.0.3": "@ohos/crypto-js@2.0.3",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user