cpu查看
This commit is contained in:
		
							parent
							
								
									fea0ba6a69
								
							
						
					
					
						commit
						9125b7d9eb
					
				| @ -311,44 +311,40 @@ function getChuankouFnMsg() { | ||||
|   setTimeout(() => { | ||||
|     getChuankouFnMsg() | ||||
|   }, 200) | ||||
|   // let timeout = 50000; // 2秒超时
 | ||||
|   // let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
 | ||||
|   // testNapi.SerialSendAsync(globalThis.fd, databuff, (ret) => {
 | ||||
|   //   testNapi.SerialRecvAsync(globalThis.fd, timeout, (revTestInfo) => {
 | ||||
|   //
 | ||||
|   //     const message = revTestInfo?.recevedBuf?.toString()
 | ||||
|   //     if (message == '') {
 | ||||
|   //       globalThis.num = 1
 | ||||
|   //       // clearInterval(chuankou)
 | ||||
|   //       testNapi.SerialClose(globalThis.fd);
 | ||||
|   //       globalThis.fd = null
 | ||||
|   //       setTimeout(() => {
 | ||||
|   //         getChuankouFn()
 | ||||
|   //       }, 2000)
 | ||||
|   //       return
 | ||||
|   //     }
 | ||||
|   //     const msg = message?.split(',')
 | ||||
|   //     if (!msg?.length) {
 | ||||
|   //
 | ||||
|   //     } else if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) {
 | ||||
|   //
 | ||||
|   //     } else if (msg.length < 12) {
 | ||||
|   //
 | ||||
|   //     } else {
 | ||||
|   //       globalThis.chuankoMsg = msg[9]
 | ||||
|   //     }
 | ||||
|   //
 | ||||
|   //     setTimeout(() => {
 | ||||
|   //       getChuankouFnMsg()
 | ||||
|   //     }, 500)
 | ||||
|   //
 | ||||
|   //     // hilog.info(0x0000, 'testTag', 'Test NAPI SerialRecvAsync callback in');
 | ||||
|   //     // hilog.info(0x0000, 'testTag', 'Test NAPI SerialRecvAsync recevedLen = %{public}d', revTestInfo.recevedLen);
 | ||||
|   //     // hilog.info(0x0000, 'testTag', 'Test NAPI SerialRecvAsync recevedBuf = %{public}s', revTestInfo.recevedBuf.toString());
 | ||||
|   //   });
 | ||||
|   //
 | ||||
|   // });
 | ||||
|   // let revTestInfo = testNapi?.SerialRecv(globalThis.fd, timeout);
 | ||||
|   let timeout = 50000; // 2秒超时
 | ||||
|   let databuff = [0x61, 0xAA, 0x0A, 0X15, 0X00]; // send ABCDE
 | ||||
|   testNapi.SerialSendAsync(globalThis.fd, databuff, (ret) => { | ||||
|     testNapi.SerialRecvAsync(globalThis.fd, timeout, (revTestInfo) => { | ||||
| 
 | ||||
|       const message = revTestInfo?.recevedBuf?.toString() | ||||
|       if (message == '') { | ||||
|         globalThis.num = 1 | ||||
|         // clearInterval(chuankou)
 | ||||
|         testNapi.SerialClose(globalThis.fd); | ||||
|         globalThis.fd = null | ||||
|         setTimeout(() => { | ||||
|           getChuankouFn() | ||||
|         }, 2000) | ||||
|         return | ||||
|       } | ||||
|       const msg = message?.split(',') | ||||
|       if (!msg?.length) { | ||||
| 
 | ||||
|       } else if (msg[0] != '98' || msg[1] != '85' || msg.length < 9) { | ||||
| 
 | ||||
|       } else if (msg.length < 12) { | ||||
| 
 | ||||
|       } else { | ||||
|         globalThis.chuankoMsg = msg[9] | ||||
|       } | ||||
| 
 | ||||
|       setTimeout(() => { | ||||
|         getChuankouFnMsg() | ||||
|       }, 500) | ||||
| 
 | ||||
|     }); | ||||
| 
 | ||||
|   }); | ||||
| } | ||||
| 
 | ||||
| let chuankou | ||||
|  | ||||
| @ -44,7 +44,7 @@ export default class EntryAbility extends UIAbility { | ||||
|     hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); | ||||
|     setInterval(() => { | ||||
|       console.log("examPeerOccupy", examPeerOccupy()) | ||||
|     }, 2000) | ||||
|     }, 5000) | ||||
| 
 | ||||
| 
 | ||||
|     globalThis.carInfo = {} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user