|  |  | @ -1,4 +1,5 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | import os |  |  |  | import os | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import time | 
			
		
	
		
		
			
				
					
					|  |  |  | from typing import Callable, Dict, List, Optional, Tuple |  |  |  | from typing import Callable, Dict, List, Optional, Tuple | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | from cereal import car |  |  |  | from cereal import car | 
			
		
	
	
		
		
			
				
					|  |  | @ -125,6 +126,7 @@ def fingerprint(logcan, sendcan, num_pandas): | 
			
		
	
		
		
			
				
					
					|  |  |  |   ecu_rx_addrs = set() |  |  |  |   ecu_rx_addrs = set() | 
			
		
	
		
		
			
				
					
					|  |  |  |   params = Params() |  |  |  |   params = Params() | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   start_time = time.monotonic() | 
			
		
	
		
		
			
				
					
					|  |  |  |   if not skip_fw_query: |  |  |  |   if not skip_fw_query: | 
			
		
	
		
		
			
				
					
					|  |  |  |     # Vin query only reliably works through OBDII |  |  |  |     # Vin query only reliably works through OBDII | 
			
		
	
		
		
			
				
					
					|  |  |  |     bus = 1 |  |  |  |     bus = 1 | 
			
		
	
	
		
		
			
				
					|  |  | @ -165,6 +167,8 @@ def fingerprint(logcan, sendcan, num_pandas): | 
			
		
	
		
		
			
				
					
					|  |  |  |   set_obd_multiplexing(params, False) |  |  |  |   set_obd_multiplexing(params, False) | 
			
		
	
		
		
			
				
					
					|  |  |  |   params.put_bool("FirmwareQueryDone", True) |  |  |  |   params.put_bool("FirmwareQueryDone", True) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   fw_query_time = time.monotonic() - start_time | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   # CAN fingerprint |  |  |  |   # CAN fingerprint | 
			
		
	
		
		
			
				
					
					|  |  |  |   # drain CAN socket so we get the latest messages |  |  |  |   # drain CAN socket so we get the latest messages | 
			
		
	
		
		
			
				
					
					|  |  |  |   messaging.drain_sock_raw(logcan) |  |  |  |   messaging.drain_sock_raw(logcan) | 
			
		
	
	
		
		
			
				
					|  |  | @ -185,7 +189,7 @@ def fingerprint(logcan, sendcan, num_pandas): | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   cloudlog.event("fingerprinted", car_fingerprint=car_fingerprint, source=source, fuzzy=not exact_match, cached=cached, |  |  |  |   cloudlog.event("fingerprinted", car_fingerprint=car_fingerprint, source=source, fuzzy=not exact_match, cached=cached, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  fw_count=len(car_fw), ecu_responses=list(ecu_rx_addrs), vin_rx_addr=vin_rx_addr, fingerprints=finger, |  |  |  |                  fw_count=len(car_fw), ecu_responses=list(ecu_rx_addrs), vin_rx_addr=vin_rx_addr, fingerprints=finger, | 
			
		
	
		
		
			
				
					
					|  |  |  |                  error=True) |  |  |  |                  fw_query_time=fw_query_time, error=True) | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |   return car_fingerprint, finger, vin, car_fw, source, exact_match |  |  |  |   return car_fingerprint, finger, vin, car_fw, source, exact_match | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |