|  |  | @ -1,8 +1,9 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | package com.yinuo.safetywatcher.watcher.port |  |  |  | package com.yinuo.safetywatcher.watcher.port | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import android.os.Process | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import com.common.commonlib.db.DBUtils | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.common.serialport.ComMultiPortUtils |  |  |  | import com.common.serialport.ComMultiPortUtils | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.yinuo.safetywatcher.watcher.port.cmd.CMD |  |  |  | import com.yinuo.safetywatcher.watcher.port.cmd.CMD | 
			
		
	
		
		
			
				
					
					|  |  |  | import android.os.Process |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  | import com.yinuo.safetywatcher.watcher.port.cmd.CalibrationCmd |  |  |  | import com.yinuo.safetywatcher.watcher.port.cmd.CalibrationCmd | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | object GasPortUtils { |  |  |  | object GasPortUtils { | 
			
		
	
	
		
		
			
				
					|  |  | @ -37,6 +38,9 @@ object GasPortUtils { | 
			
		
	
		
		
			
				
					
					|  |  |  |             readGasMsgThread = Thread { |  |  |  |             readGasMsgThread = Thread { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 try { |  |  |  |                 try { | 
			
		
	
		
		
			
				
					
					|  |  |  |                     Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); |  |  |  |                     Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     // 删除老的传感器列表数据 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     val gasTypeDao = DBUtils.gasTypeDao() | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     gasTypeDao.deleteAll() | 
			
		
	
		
		
			
				
					
					|  |  |  |                     while (true) { |  |  |  |                     while (true) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                         // 延时一段时间后,发送指令读取气体数据 |  |  |  |                         // 延时一段时间后,发送指令读取气体数据 | 
			
		
	
		
		
			
				
					
					|  |  |  |                         Thread.sleep(READ_MSG_INTERVAL) |  |  |  |                         Thread.sleep(READ_MSG_INTERVAL) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |