fix: 档位串口读取优化
This commit is contained in:
		
							parent
							
								
									e36b0f018b
								
							
						
					
					
						commit
						448a16fab9
					
				| @ -433,10 +433,11 @@ let fd | ||||
| const devPath = "/dev/ttyS3" | ||||
| 
 | ||||
| function openChuankouFn(callback) { | ||||
|   console.log('SerialOpen in indexservice, path=' + devPath) | ||||
| 
 | ||||
|   //自动挡车不读取串口
 | ||||
|   if(globalThis.carInfo && globalThis.carInfo.kscx == 'C1'){ | ||||
|   getSyncData('ES_CARINFO').then(result => { | ||||
|     const carInfo = result[0] || {}; | ||||
|     globalThis.carInfo.kscx = carInfo.kscx | ||||
|     console.info('srj ES_CARINFO=>',JSON.stringify(carInfo)) | ||||
|     if(carInfo.kscx == 'C1'){ | ||||
|       testNapi.SerialOpenAsync(devPath, (fd) => { | ||||
|         globalThis.fd = fd; | ||||
|         globalThis.num = 0 | ||||
| @ -446,6 +447,7 @@ function openChuankouFn(callback) { | ||||
|         }); | ||||
|       }); | ||||
|     } | ||||
|   }) | ||||
| } | ||||
| 
 | ||||
| function getChuankouFnMsg() { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user