fix:档位串口优化&代理屏蔽掉tcp
This commit is contained in:
		
							parent
							
								
									29f85dca0a
								
							
						
					
					
						commit
						5ac58a2981
					
				| @ -14,7 +14,7 @@ export default class ServiceExtAbility extends ServiceExtension { | |||||||
| 
 | 
 | ||||||
|   async onCreate(want): Promise<void> { |   async onCreate(want): Promise<void> { | ||||||
|     // tcp创建连接 |     // tcp创建连接 | ||||||
|     await tcpUtil.init() |     // await tcpUtil.init() | ||||||
|     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility-- onCreate, want: ${want.abilityName}`); |     hilog.info(DOMAIN_NUMBER, TAG, `js-test ServiceExtensionAbility-- onCreate, want: ${want.abilityName}`); | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -436,15 +436,17 @@ const devPath = "/dev/ttyS3" | |||||||
| function openChuankouFn(callback) { | function openChuankouFn(callback) { | ||||||
|   console.log('SerialOpen in indexservice, path=' + devPath) |   console.log('SerialOpen in indexservice, path=' + devPath) | ||||||
| 
 | 
 | ||||||
|   //TODO 自动挡车不读取串口
 |   //自动挡车不读取串口
 | ||||||
|   testNapi.SerialOpenAsync(devPath, (fd) => { |   if(globalThis.carInfo && globalThis.carInfo.kscx == 'C1'){ | ||||||
|     globalThis.fd = fd; |     testNapi.SerialOpenAsync(devPath, (fd) => { | ||||||
|     globalThis.num = 0 |       globalThis.fd = fd; | ||||||
|     let parity = 0x4e; // 'N'
 |       globalThis.num = 0 | ||||||
|     let ret = testNapi.SerialSetAsync(globalThis.fd, 115200, 0, 8, 1, parity, (ret) => { |       let parity = 0x4e; // 'N'
 | ||||||
|       callback() |       let ret = testNapi.SerialSetAsync(globalThis.fd, 115200, 0, 8, 1, parity, (ret) => { | ||||||
|  |         callback() | ||||||
|  |       }); | ||||||
|     }); |     }); | ||||||
|   }); |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function getChuankouFnMsg() { | function getChuankouFnMsg() { | ||||||
|  | |||||||
| @ -739,7 +739,10 @@ struct Index { | |||||||
|       } |       } | ||||||
|     }, 1000) |     }, 1000) | ||||||
|     this.createAlbum() |     this.createAlbum() | ||||||
| 
 |     getSyncData('ES_CARINFO').then(result => { | ||||||
|  |       const carInfo = result[0] || {}; | ||||||
|  |       globalThis.carInfo.kscx = carInfo.kscx | ||||||
|  |     }) | ||||||
|     //  clearInterval(globalThis.demo) |     //  clearInterval(globalThis.demo) | ||||||
|     // globalThis.demo= setInterval(()=>{ |     // globalThis.demo= setInterval(()=>{ | ||||||
|     //   const str= {"carId":"1062","examinationRoomId":"2","videoVersion":"1.0","judgeVersion":"2023.09.30.1","shellVersion":"2023.12.13.01","host":"http://172.37.55.191:8082"} |     //   const str= {"carId":"1062","examinationRoomId":"2","videoVersion":"1.0","judgeVersion":"2023.09.30.1","shellVersion":"2023.12.13.01","host":"http://172.37.55.191:8082"} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user