|  |  |  | @ -87,7 +87,7 @@ void CANMessages::process(QHash<QString, std::deque<CanData>> *messages) { | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | bool CANMessages::eventFilter(const Event *event) { | 
			
		
	
		
			
				
					|  |  |  |  |   static double prev_update_sec = 0; | 
			
		
	
		
			
				
					|  |  |  |  |   static double prev_update_ts = 0; | 
			
		
	
		
			
				
					|  |  |  |  |   // drop packets when the GUI thread is calling seekTo. to make sure the current_sec is accurate.
 | 
			
		
	
		
			
				
					|  |  |  |  |   if (!seeking && event->which == cereal::Event::Which::CAN) { | 
			
		
	
		
			
				
					|  |  |  |  |     if (!received_msgs) { | 
			
		
	
	
		
			
				
					|  |  |  | @ -121,8 +121,9 @@ bool CANMessages::eventFilter(const Event *event) { | 
			
		
	
		
			
				
					|  |  |  |  |       } | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if (current_sec < prev_update_sec || (current_sec - prev_update_sec) > 1.0 / settings.fps) { | 
			
		
	
		
			
				
					|  |  |  |  |       prev_update_sec = current_sec; | 
			
		
	
		
			
				
					|  |  |  |  |     double ts = millis_since_boot(); | 
			
		
	
		
			
				
					|  |  |  |  |     if ((ts - prev_update_ts) > (1000.0 / settings.fps)) { | 
			
		
	
		
			
				
					|  |  |  |  |       prev_update_ts = ts; | 
			
		
	
		
			
				
					|  |  |  |  |       // use pointer to avoid data copy in queued connection.
 | 
			
		
	
		
			
				
					|  |  |  |  |       emit received(received_msgs.release()); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
	
		
			
				
					|  |  |  | 
 |