fix: 润和
This commit is contained in:
		
							parent
							
								
									6930e9afc3
								
							
						
					
					
						commit
						4e3c3bf465
					
				| @ -5,9 +5,9 @@ | |||||||
|         "name": "default", |         "name": "default", | ||||||
|         "material": { |         "material": { | ||||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", |           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", | ||||||
|           "storePassword": "0000001AC0C49320C84ECD6C7BA0119428C66297EAF08E5011B23EBA83794F0FA803077D0F4848203ADD", |           "storePassword": "0000001A1173A56391B52980E84237B06A106777310E419AF46EBEB63A7D126BCA0F5657D119081FE3C9", | ||||||
|           "keyAlias": "debugKey", |           "keyAlias": "debugKey", | ||||||
|           "keyPassword": "0000001A7A1DB8B37DA86FBA8DBDDE9B6E4DC5801A351175FB4980E662677BB08D6E02D623FAD2EB993B", |           "keyPassword": "0000001A5FF060362EBE093828B7604C511B827EB8C93BAD85C9745AA07A084FBAEB8687CC941F8CC0B7", | ||||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", |           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", | ||||||
|           "signAlg": "SHA256withECDSA", |           "signAlg": "SHA256withECDSA", | ||||||
|           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" |           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" | ||||||
|  | |||||||
| @ -284,50 +284,57 @@ export async function takePhotoFn(context) { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| let fd | let fd | ||||||
| const devPath="/dev/ttyS1" | const devPath = "/dev/ttyS1" | ||||||
|  | 
 | ||||||
| async function openChuankouFn() { | async function openChuankouFn() { | ||||||
|   fd =await testNapi.SerialOpen(devPath); |   fd = await testNapi.SerialOpen(devPath); | ||||||
|   globalThis.fd=fd |   globalThis.fd = fd | ||||||
|   console.log('chuankoufd',globalThis.fd) |   console.log('chuankoufd', globalThis.fd) | ||||||
| 
 | 
 | ||||||
|   // let parity = 0x4e; // 'N'
 |   // let parity = 0x4e; // 'N'
 | ||||||
|   let ret =await testNapi.SerialSet(fd, 115200,0, 8, 1, 0) |   let ret = await testNapi.SerialSet(fd, 115200, 0, 8, 1, 0) | ||||||
|   console.log('daihairet',ret) |   console.log('daihairet', ret) | ||||||
| } | } | ||||||
|  | 
 | ||||||
| async function getChuankouFnMsg() { | async function getChuankouFnMsg() { | ||||||
|   let timeout = 5000; // 2秒超时
 |   let timeout = 5000; // 2秒超时
 | ||||||
|   let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
 |   let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
 | ||||||
|   let uint8Arr = new Uint8Array(databuff); |   let uint8Arr = new Uint8Array(databuff); | ||||||
|   console.log('daihai',globalThis.fd) |   console.log('daihai', globalThis.fd) | ||||||
|   let ret = await testNapi.SerialSend(globalThis.fd, uint8Arr); |   let ret = await testNapi.SerialSend(globalThis.fd, uint8Arr); | ||||||
|   console.log('daihai SerialSend ret: ' + ret) |   console.log('daihai SerialSend ret: ' + ret) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   testNapi.SerialRecv(globalThis.fd, timeout,12).then(revTestInfo=>{ |   testNapi.SerialRecv(globalThis.fd, timeout, 12).then(revTestInfo => { | ||||||
|     console.log('daihai',revTestInfo?.recevedBuf?.toString()) |     console.log('daihai', revTestInfo?.recevedBuf?.toString()) | ||||||
|     const message =  revTestInfo?.recevedBuf?.toString() |     const message = revTestInfo?.recevedBuf?.toString() | ||||||
|  |     console.log("chuankou xinxi",message) | ||||||
|     if (message == '') { |     if (message == '') { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     const msg = message?.split(',') |     const msg = message?.split(',') | ||||||
|     if(!msg?.length){ |     if (!msg?.length) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) { |     if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) { | ||||||
|       return |       return | ||||||
|     } |     } | ||||||
|     globalThis.chuankoMsg=msg[9] |     console.log("chuankou 档位", msg[9]) | ||||||
|   }).catch((err)=>{ |     if(msg[9]==0||msg[9]==1||msg[9]==2||msg[9]==3||msg[9]==4||msg[9]==5){ | ||||||
|     console.log('daihaierror',JSON.stringify(err)) |       globalThis.chuankoMsg = msg[9] | ||||||
|  |     } | ||||||
|  |   }).catch((err) => { | ||||||
|  |     console.log('daihaierror', JSON.stringify(err)) | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
| export async function getChuankouFn(){ | 
 | ||||||
|   if(globalThis.fd){ | export async function getChuankouFn() { | ||||||
|  |   if (!globalThis.fd) { | ||||||
|  |     console.log("chuankou 没有fd") | ||||||
|  |     openChuankouFn() | ||||||
|     return |     return | ||||||
|   } |   } | ||||||
|   openChuankouFn() |   console.log("chuankou 定时器") | ||||||
|   setInterval(()=>{ |   getChuankouFnMsg() | ||||||
|     getChuankouFnMsg() |  | ||||||
|   },1000) |  | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -6,13 +6,13 @@ import fs from '@ohos.file.fs' | |||||||
| import photoAccessHelper from '@ohos.file.photoAccessHelper' | import photoAccessHelper from '@ohos.file.photoAccessHelper' | ||||||
| import dataSharePredicates from '@ohos.data.dataSharePredicates' | import dataSharePredicates from '@ohos.data.dataSharePredicates' | ||||||
| import { dateFormat, getCurrentTime } from '../utils/tools' | import { dateFormat, getCurrentTime } from '../utils/tools' | ||||||
| import rtsp_server from '@ohos.rtsprecord'; | import record from '@ohos.rtsprecord'; | ||||||
| // import record from '@ohos.rtsprecord';
 | // import record from '@ohos.rtsprecord';
 | ||||||
| import { FileHelper } from './FileHelper'; | import { FileHelper } from './FileHelper'; | ||||||
| import FileUtil from '../utils/File'; | import FileUtil from '../utils/File'; | ||||||
| import { GlobalConfig } from '../../config'; | import { GlobalConfig } from '../../config'; | ||||||
| 
 | 
 | ||||||
| // const rtsp_server = record.createServer();
 | const rtsp_server = record.createServer(); | ||||||
| //开始录屏
 | //开始录屏
 | ||||||
| const FILE_ASSET_FETCH_COLUMNS = [photoAccessHelper.PhotoKeys.URI, | const FILE_ASSET_FETCH_COLUMNS = [photoAccessHelper.PhotoKeys.URI, | ||||||
|   photoAccessHelper.PhotoKeys.PHOTO_TYPE, |   photoAccessHelper.PhotoKeys.PHOTO_TYPE, | ||||||
| @ -30,6 +30,7 @@ const FILE_ASSET_FETCH_COLUMNS = [photoAccessHelper.PhotoKeys.URI, | |||||||
|   photoAccessHelper.PhotoKeys.POSITION, |   photoAccessHelper.PhotoKeys.POSITION, | ||||||
|   photoAccessHelper.PhotoKeys.DATE_TRASHED, |   photoAccessHelper.PhotoKeys.DATE_TRASHED, | ||||||
|   photoAccessHelper.PhotoKeys.HIDDEN]; |   photoAccessHelper.PhotoKeys.HIDDEN]; | ||||||
|  | 
 | ||||||
| // const rtsp_server = record.createServer();
 | // const rtsp_server = record.createServer();
 | ||||||
| 
 | 
 | ||||||
| export async function saveStartRecordVideo(path) { | export async function saveStartRecordVideo(path) { | ||||||
| @ -57,6 +58,7 @@ export async function saveStartRecordVideo(path) { | |||||||
|     reslove(record_handle) |     reslove(record_handle) | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
|  | 
 | ||||||
| async function getfilehandleCode(td, param, dir, path, index) { | async function getfilehandleCode(td, param, dir, path, index) { | ||||||
|   return new Promise(async (reslove, reject) => { |   return new Promise(async (reslove, reject) => { | ||||||
|     console.log('pathpath1', path) |     console.log('pathpath1', path) | ||||||
| @ -67,8 +69,9 @@ async function getfilehandleCode(td, param, dir, path, index) { | |||||||
|   }) |   }) | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
| export async function startRecordVideo(param?, td?, context?, dir?,path?,index?) { | 
 | ||||||
|   return new Promise(async(reslove, reject) => { | export async function startRecordVideo(param?, td?, context?, dir?, path?, index?) { | ||||||
|  |   return new Promise(async (reslove, reject) => { | ||||||
| 
 | 
 | ||||||
|     var video_uri = `rtsp://${param.userName}:${param.pwd}@${param.ip}:${param.port}/h264/ch${td}/main/av_stream`; |     var video_uri = `rtsp://${param.userName}:${param.pwd}@${param.ip}:${param.port}/h264/ch${td}/main/av_stream`; | ||||||
|     if (rtsp_server != null) { |     if (rtsp_server != null) { | ||||||
| @ -113,17 +116,19 @@ export async function endRecordVideo(record_handleObj) { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | 
 | ||||||
| /** | /** | ||||||
|  *拍照 |  *拍照 | ||||||
|  * @param param |  * @param param | ||||||
|  * @param context |  * @param context | ||||||
|  * @param type=0不获取base64 |  * @param type=0不获取base64 | ||||||
|  */ |  */ | ||||||
| interface  takePhotoParam { | interface takePhotoParam { | ||||||
|   name?:string, |   name?: string, | ||||||
|   base64?:string, |   base64?: string, | ||||||
|   fileSize?:number, |   fileSize?: number, | ||||||
| } | } | ||||||
|  | 
 | ||||||
| /** | /** | ||||||
|  * |  * | ||||||
|  * @param param |  * @param param | ||||||
| @ -134,7 +139,8 @@ interface  takePhotoParam { | |||||||
|  * @returns |  * @returns | ||||||
|  */ |  */ | ||||||
| const fileHelper = new FileHelper(); | const fileHelper = new FileHelper(); | ||||||
| export async function takePhoto(param, context,dir,flag=1,callback?) { | 
 | ||||||
|  | export async function takePhoto(param, context, dir, flag = 1, callback?) { | ||||||
| 
 | 
 | ||||||
|   var video_uri = `rtsp://${param.userName}:${param.pwd}@${param.ip}:${param.port}/h264/ch${param.pztd}/main/av_stream`; |   var video_uri = `rtsp://${param.userName}:${param.pwd}@${param.ip}:${param.port}/h264/ch${param.pztd}/main/av_stream`; | ||||||
|   // var video_uri = `rtsp://admin:openharmony1@192.168.1.66:554/Streaming/Channels/3`;
 |   // var video_uri = `rtsp://admin:openharmony1@192.168.1.66:554/Streaming/Channels/3`;
 | ||||||
| @ -146,11 +152,11 @@ export async function takePhoto(param, context,dir,flag=1,callback?) { | |||||||
|   console.log(`baoyihu Rtsprecord baohaowen getVideoSnapshot fileName:` + fileName); |   console.log(`baoyihu Rtsprecord baohaowen getVideoSnapshot fileName:` + fileName); | ||||||
|   // @ts-ignore
 |   // @ts-ignore
 | ||||||
|   // var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
 |   // var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
 | ||||||
|   if(flag==0){ |   if (flag == 0) { | ||||||
|     // @ts-ignore
 |     // @ts-ignore
 | ||||||
|     rtsp_server.detectVideoSnapshotSize(video_uri,fileName).then((snapResult)=>{ |     rtsp_server.detectVideoSnapshotSize(video_uri, fileName).then((snapResult) => { | ||||||
|       console.log("baohaowen_detectLoop round end size1:"+snapResult.fileSize); |       console.log("baohaowen_detectLoop round end size1:" + snapResult.fileSize); | ||||||
|       callback({fileSize:snapResult.fileSize }) |       callback({ fileSize: snapResult.fileSize }) | ||||||
|     }); |     }); | ||||||
|     // rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,false,(err,snapResult)=>{
 |     // rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,false,(err,snapResult)=>{
 | ||||||
|     //   console.log(`baoyihu getVideoSnapshot  return `);
 |     //   console.log(`baoyihu getVideoSnapshot  return `);
 | ||||||
| @ -161,29 +167,26 @@ export async function takePhoto(param, context,dir,flag=1,callback?) { | |||||||
|     //   callback({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize })
 |     //   callback({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize })
 | ||||||
|     //   console.log('getmyLog01')
 |     //   console.log('getmyLog01')
 | ||||||
|     // });
 |     // });
 | ||||||
|   } |   } else { | ||||||
|   else{ |     return new Promise<takePhotoParam>((resolve, reject) => { | ||||||
|     return new Promise<takePhotoParam>((resolve,reject)=>{ |  | ||||||
|       // @ts-ignore
 |       // @ts-ignore
 | ||||||
|       rtsp_server.getVideoSnapshot(context, video_uri, fileName,dir,true,(snapResult,err)=>{ |       rtsp_server.getVideoSnapshot(context, video_uri, fileName, dir, true, (err, snapResult) => { | ||||||
|         console.log('getPhtot') |         console.log('getPhtot') | ||||||
|         resolve({base64: snapResult.dataString,name:snapResult.fileName,fileSize:snapResult.fileSize }) |         resolve({ base64: snapResult.dataString, name: snapResult.fileName, fileSize: snapResult.fileSize }) | ||||||
|       }); |       }); | ||||||
|     }) |     }) | ||||||
|     console.log('getmyLog02') |     console.log('getmyLog02') | ||||||
| 
 | 
 | ||||||
|   } |   } | ||||||
|   console.log('getmyLog03') |   console.log('getmyLog03') | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function deleteAllFileByPiC(dirName) { | export async function deleteAllFileByPiC(dirName) { | ||||||
|   // const fileHelper = new FileHelper();
 |   // const fileHelper = new FileHelper();
 | ||||||
|   fileHelper.deleteFileOfAlbum(dirName,1); |   fileHelper.deleteFileOfAlbum(dirName, 1); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function deleteAllVideos(context,type: photoAccessHelper.AlbumType, subType: photoAccessHelper.AlbumSubtype): Promise<void> { | export async function deleteAllVideos(context, type: photoAccessHelper.AlbumType, subType: photoAccessHelper.AlbumSubtype): Promise<void> { | ||||||
|   let fetchResult: photoAccessHelper.FetchResult<photoAccessHelper.Album> = null; |   let fetchResult: photoAccessHelper.FetchResult<photoAccessHelper.Album> = null; | ||||||
|   try { |   try { | ||||||
|     const userFileMgr = photoAccessHelper.getPhotoAccessHelper(context); |     const userFileMgr = photoAccessHelper.getPhotoAccessHelper(context); | ||||||
|  | |||||||
| @ -36,6 +36,7 @@ export default class UdpClient { | |||||||
|     this.oppositeIp = udpOppositeIp |     this.oppositeIp = udpOppositeIp | ||||||
|     this.localIpPort = udplocalIpPort |     this.localIpPort = udplocalIpPort | ||||||
|     this.oppositeIpPort = udpOppositeIpPort |     this.oppositeIpPort = udpOppositeIpPort | ||||||
|  |     console.log("chuankou 初始化",) | ||||||
|     getChuankouFn() |     getChuankouFn() | ||||||
|     console.log(TAG,'newUdp') |     console.log(TAG,'newUdp') | ||||||
|     // this.stashFn=()=>{}
 |     // this.stashFn=()=>{}
 | ||||||
|  | |||||||
| @ -33,6 +33,7 @@ import FileUtil from '../common/utils/File'; | |||||||
| import SignDisplayCom from './compontents/signDisplayCom'; | import SignDisplayCom from './compontents/signDisplayCom'; | ||||||
| import promptAction from '@ohos.promptAction'; | import promptAction from '@ohos.promptAction'; | ||||||
| import { voiceService } from '../common/service/voiceService'; | import { voiceService } from '../common/service/voiceService'; | ||||||
|  | import { getChuankouFn } from '../common/service/indexService'; | ||||||
| 
 | 
 | ||||||
| @Entry | @Entry | ||||||
| @Component | @Component | ||||||
| @ -42,6 +43,11 @@ struct Index { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async aboutToAppear() { |   async aboutToAppear() { | ||||||
|  |     getChuankouFn() | ||||||
|  |     setInterval(() => { | ||||||
|  |       console.log("chuankou 定时器2") | ||||||
|  |       getChuankouFn() | ||||||
|  |     }, 1000) | ||||||
|     globalThis.windowClass.setWindowSystemBarEnable([]) |     globalThis.windowClass.setWindowSystemBarEnable([]) | ||||||
|     const time = await getCurrentTime() |     const time = await getCurrentTime() | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -6,6 +6,8 @@ import { GPSData, SignalData } from '../../mock'; | |||||||
| import { SignalDataType } from '../../model'; | import { SignalDataType } from '../../model'; | ||||||
| import FileUtil from '../../common/utils/File' | import FileUtil from '../../common/utils/File' | ||||||
| import { GlobalConfig } from '../../config/index' | import { GlobalConfig } from '../../config/index' | ||||||
|  | import { getChuankouFn } from '../../common/service/indexService'; | ||||||
|  | 
 | ||||||
| @Component | @Component | ||||||
| export default struct SignDisplayCom { | export default struct SignDisplayCom { | ||||||
|   @State showBack: boolean = false |   @State showBack: boolean = false | ||||||
| @ -99,91 +101,91 @@ export default struct SignDisplayCom { | |||||||
|         }.width(936 * this.ratio) |         }.width(936 * this.ratio) | ||||||
| 
 | 
 | ||||||
|         Column() { |         Column() { | ||||||
|           // Flex({ direction: FlexDirection.Column }) { |           Flex({ direction: FlexDirection.Column }) { | ||||||
|           //   Row() { |             Row() { | ||||||
|           //     Text("发送次数:" + this.signArr[49] || '0') |               Text("发送次数:" + this.signArr[49] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('25%') |                 .width('25%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("固件版本:" + this.signArr[54] || '0') |               Text("固件版本:" + this.signArr[54] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('30%') |                 .width('30%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("GPS数据次数/数据长度:" + this.signArr[59] || '0') |               Text("GPS数据次数/数据长度:" + this.signArr[59] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //   }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) |             }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) | ||||||
|           // | 
 | ||||||
|           //   Row() { |             Row() { | ||||||
|           //     Text("方向盘类型:" + this.signArr[50] || '0') |               Text("方向盘类型:" + this.signArr[50] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('25%') |                 .width('25%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("按键数值:" + this.signArr[55] || '0') |               Text("按键数值:" + this.signArr[55] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('30%') |                 .width('30%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("GPS错误次数:" + this.signArr[60] || '0') |               Text("GPS错误次数:" + this.signArr[60] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //   }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) |             }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) | ||||||
|           // | 
 | ||||||
|           //   Row() { |             Row() { | ||||||
|           //     Text("汽车类型:" + this.signArr[51] || '0') |               Text("汽车类型:" + this.signArr[51] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('25%') |                 .width('25%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("GPS板卡类型:" + this.signArr[56] || '0') |               Text("GPS板卡类型:" + this.signArr[56] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('30%') |                 .width('30%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("已工作时长/设定的工作时长:" + this.signArr[61] || '0') |               Text("已工作时长/设定的工作时长:" + this.signArr[61] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //   }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) |             }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) | ||||||
|           // | 
 | ||||||
|           //   Row() { |             Row() { | ||||||
|           //     Text("接口心跳:" + this.signArr[52] || '0') |               Text("接口心跳:" + this.signArr[52] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('25%') |                 .width('25%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("GPS板卡软件版本:" + this.signArr[57] || '0') |               Text("GPS板卡软件版本:" + this.signArr[57] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('30%') |                 .width('30%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("改正数次数/改正数大小:" + this.signArr[58] || '0') |               Text("改正数次数/改正数大小:" + this.signArr[58] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //   }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) |             }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) | ||||||
|           // | 
 | ||||||
|           //   Row() { |             Row() { | ||||||
|           //     Text("本机IP:" + '192.168.7.170') |               Text("本机IP:" + '192.168.7.170') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .width('25%') |                 .width('25%') | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //     Text("改正数数据长度*数据长度-基准站RTCM改正数类型:" + this.signArr[62] || '0') |               Text("改正数数据长度*数据长度-基准站RTCM改正数类型:" + this.signArr[62] || '0') | ||||||
|           //       .fontColor('#FFF5E5') |                 .fontColor('#FFF5E5') | ||||||
|           //       .fontSize(14 * this.ratio) |                 .fontSize(14 * this.ratio) | ||||||
|           //       .textAlign(TextAlign.Start) |                 .textAlign(TextAlign.Start) | ||||||
|           //   }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) |             }.justifyContent(FlexAlign.Start).padding({ left: 10 * this.ratio }).margin({ top: 8 * this.ratio }) | ||||||
|           // } |           } | ||||||
|           // .backgroundColor('#282828') |           .backgroundColor('#282828') | ||||||
|           // .width(this.ratio * 890) |           .width(this.ratio * 890) | ||||||
|           // .height(136 * this.ratio) |           .height(136 * this.ratio) | ||||||
|           // .margin({ left: 0 * this.ratio, top: 15 * this.ratio }) |           .margin({ left: 0 * this.ratio, top: 15 * this.ratio }) | ||||||
| 
 | 
 | ||||||
|           Row() { |           Row() { | ||||||
|             Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) { |             Flex({ direction: FlexDirection.Column, wrap: FlexWrap.Wrap }) { | ||||||
| @ -322,10 +324,14 @@ export default struct SignDisplayCom { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   aboutToDisappear() { |   aboutToDisappear() { | ||||||
|     clearInterval(this.interval) |     // clearInterval(this.interval) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async aboutToAppear() { |   async aboutToAppear() { | ||||||
|  |     setInterval(() => { | ||||||
|  |       console.log("chuankou 定时器2") | ||||||
|  |       getChuankouFn() | ||||||
|  |     }, 1000) | ||||||
|     // const fileUtil = new FileUtil(globalThis.context) |     // const fileUtil = new FileUtil(globalThis.context) | ||||||
|     // const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt') |     // const data = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt') | ||||||
|     // this.udplocalIp=JSON.parse(data)?.udplocalIp||'192.168.7.170' |     // this.udplocalIp=JSON.parse(data)?.udplocalIp||'192.168.7.170' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user