|  |  |  | @ -177,22 +177,21 @@ def get_present_ecus(logcan, sendcan, num_pandas=1) -> Set[EcuAddrBusType]: | 
			
		
	
		
			
				
					|  |  |  |  |     if r.bus > num_pandas * 4 - 1: | 
			
		
	
		
			
				
					|  |  |  |  |       continue | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     for brand_versions in VERSIONS[brand].values(): | 
			
		
	
		
			
				
					|  |  |  |  |       for ecu_type, addr, sub_addr in list(brand_versions) + config.extra_ecus: | 
			
		
	
		
			
				
					|  |  |  |  |         # Only query ecus in whitelist if whitelist is not empty | 
			
		
	
		
			
				
					|  |  |  |  |         if len(r.whitelist_ecus) == 0 or ecu_type in r.whitelist_ecus: | 
			
		
	
		
			
				
					|  |  |  |  |           a = (addr, sub_addr, r.bus) | 
			
		
	
		
			
				
					|  |  |  |  |           # Build set of queries | 
			
		
	
		
			
				
					|  |  |  |  |           if sub_addr is None: | 
			
		
	
		
			
				
					|  |  |  |  |             if a not in parallel_queries[r.obd_multiplexing]: | 
			
		
	
		
			
				
					|  |  |  |  |               parallel_queries[r.obd_multiplexing].append(a) | 
			
		
	
		
			
				
					|  |  |  |  |           else:  # subaddresses must be queried one by one | 
			
		
	
		
			
				
					|  |  |  |  |             if [a] not in queries[r.obd_multiplexing]: | 
			
		
	
		
			
				
					|  |  |  |  |               queries[r.obd_multiplexing].append([a]) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |           # Build set of expected responses to filter | 
			
		
	
		
			
				
					|  |  |  |  |           response_addr = uds.get_rx_addr_for_tx_addr(addr, r.rx_offset) | 
			
		
	
		
			
				
					|  |  |  |  |           responses.add((response_addr, sub_addr, r.bus)) | 
			
		
	
		
			
				
					|  |  |  |  |     for ecu_type, addr, sub_addr in config.get_all_ecus(VERSIONS[brand], include_ecu_type=True): | 
			
		
	
		
			
				
					|  |  |  |  |       # Only query ecus in whitelist if whitelist is not empty | 
			
		
	
		
			
				
					|  |  |  |  |       if len(r.whitelist_ecus) == 0 or ecu_type in r.whitelist_ecus: | 
			
		
	
		
			
				
					|  |  |  |  |         a = (addr, sub_addr, r.bus) | 
			
		
	
		
			
				
					|  |  |  |  |         # Build set of queries | 
			
		
	
		
			
				
					|  |  |  |  |         if sub_addr is None: | 
			
		
	
		
			
				
					|  |  |  |  |           if a not in parallel_queries[r.obd_multiplexing]: | 
			
		
	
		
			
				
					|  |  |  |  |             parallel_queries[r.obd_multiplexing].append(a) | 
			
		
	
		
			
				
					|  |  |  |  |         else:  # subaddresses must be queried one by one | 
			
		
	
		
			
				
					|  |  |  |  |           if [a] not in queries[r.obd_multiplexing]: | 
			
		
	
		
			
				
					|  |  |  |  |             queries[r.obd_multiplexing].append([a]) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         # Build set of expected responses to filter | 
			
		
	
		
			
				
					|  |  |  |  |         response_addr = uds.get_rx_addr_for_tx_addr(addr, r.rx_offset) | 
			
		
	
		
			
				
					|  |  |  |  |         responses.add((response_addr, sub_addr, r.bus)) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |   for obd_multiplexing in queries: | 
			
		
	
		
			
				
					|  |  |  |  |     queries[obd_multiplexing].insert(0, parallel_queries[obd_multiplexing]) | 
			
		
	
	
		
			
				
					|  |  |  | 
 |