|  |  |  | @ -6,8 +6,8 @@ import argparse | 
			
		
	
		
			
				
					|  |  |  |  | import os | 
			
		
	
		
			
				
					|  |  |  |  | import traceback | 
			
		
	
		
			
				
					|  |  |  |  | from tqdm import tqdm | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.tools.lib.logreader import LogReader | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.tools.lib.route import Route | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.tools.lib.logreader import LogReader, ReadMode | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.tools.lib.route import SegmentRange | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.selfdrive.car.car_helpers import interface_names | 
			
		
	
		
			
				
					|  |  |  |  | from openpilot.selfdrive.car.fw_versions import VERSIONS, match_fw_to_car | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -44,23 +44,14 @@ if __name__ == "__main__": | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   dongles = [] | 
			
		
	
		
			
				
					|  |  |  |  |   for route in tqdm(routes): | 
			
		
	
		
			
				
					|  |  |  |  |     route = route.rstrip() | 
			
		
	
		
			
				
					|  |  |  |  |     dongle_id, time = route.split('|') | 
			
		
	
		
			
				
					|  |  |  |  |     dongle_id = SegmentRange(route).dongle_id | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if dongle_id in dongles: | 
			
		
	
		
			
				
					|  |  |  |  |       continue | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if NO_API: | 
			
		
	
		
			
				
					|  |  |  |  |       qlog_path = f"cd:/{dongle_id}/{time}/0/qlog.bz2" | 
			
		
	
		
			
				
					|  |  |  |  |     else: | 
			
		
	
		
			
				
					|  |  |  |  |       route = Route(route) | 
			
		
	
		
			
				
					|  |  |  |  |       qlog_path = next((p for p in route.qlog_paths() if p is not None), None) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     if qlog_path is None: | 
			
		
	
		
			
				
					|  |  |  |  |       continue | 
			
		
	
		
			
				
					|  |  |  |  |     lr = LogReader(route, default_mode=ReadMode.QLOG) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     try: | 
			
		
	
		
			
				
					|  |  |  |  |       lr = LogReader(qlog_path) | 
			
		
	
		
			
				
					|  |  |  |  |       dongles.append(dongle_id) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |       CP = None | 
			
		
	
	
		
			
				
					|  |  |  | @ -98,13 +89,11 @@ if __name__ == "__main__": | 
			
		
	
		
			
				
					|  |  |  |  |             if len(fuzzy_matches) == 1: | 
			
		
	
		
			
				
					|  |  |  |  |               if list(fuzzy_matches)[0] != live_fingerprint: | 
			
		
	
		
			
				
					|  |  |  |  |                 wrong_fuzzy += 1 | 
			
		
	
		
			
				
					|  |  |  |  |                 print(f"{dongle_id}|{time}") | 
			
		
	
		
			
				
					|  |  |  |  |                 print("Fuzzy match wrong! Fuzzy:", fuzzy_matches, "Live:", live_fingerprint) | 
			
		
	
		
			
				
					|  |  |  |  |               else: | 
			
		
	
		
			
				
					|  |  |  |  |                 good_fuzzy += 1 | 
			
		
	
		
			
				
					|  |  |  |  |             break | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           print(f"{dongle_id}|{time}") | 
			
		
	
		
			
				
					|  |  |  |  |           print("Old style:", live_fingerprint, "Vin", CP.carVin) | 
			
		
	
		
			
				
					|  |  |  |  |           print("New style (exact):", exact_matches) | 
			
		
	
		
			
				
					|  |  |  |  |           print("New style (fuzzy):", fuzzy_matches) | 
			
		
	
	
		
			
				
					|  |  |  | 
 |