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