| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -113,19 +113,13 @@ bool safety_setter_thread(std::vector<Panda *> pandas) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return false; | 
					 | 
					 | 
					 | 
					    return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  // set to ELM327 for fingerprinting
 | 
					 | 
					 | 
					 | 
					  // openpilot can switch between multiplexing modes for different FW queries,
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  for (int i = 0; i < pandas.size(); i++) {
 | 
					 | 
					 | 
					 | 
					  // set to ELM327 and wait for FW query to finish
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//    const uint16_t safety_param = (i > 0) ? 1U : 0U;
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//    pandas[i]->set_safety_model(cereal::CarParams::SafetyModel::ELM327, safety_param);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  // wait for FW query at OBD port to finish
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  while (true) { | 
					 | 
					 | 
					 | 
					  while (true) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (do_exit || !check_all_connected(pandas) || !ignition) { | 
					 | 
					 | 
					 | 
					    if (do_exit || !check_all_connected(pandas) || !ignition) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      return false; | 
					 | 
					 | 
					 | 
					      return false; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    } | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    // set to ELM327 for fingerprinting, multiplexing is controlled by a param
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    bool obd_multiplexing_requested = p.getBool("ObdMultiplexingRequested"); | 
					 | 
					 | 
					 | 
					    bool obd_multiplexing_requested = p.getBool("ObdMultiplexingRequested"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if (obd_multiplexing_requested != p.getBool("ObdMultiplexingEnabled")) { | 
					 | 
					 | 
					 | 
					    if (obd_multiplexing_requested != p.getBool("ObdMultiplexingEnabled")) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      for (int i = 0; i < pandas.size(); i++) { | 
					 | 
					 | 
					 | 
					      for (int i = 0; i < pandas.size(); i++) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -142,13 +136,6 @@ bool safety_setter_thread(std::vector<Panda *> pandas) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    util::sleep_for(20); | 
					 | 
					 | 
					 | 
					    util::sleep_for(20); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  } | 
					 | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  // set to ELM327 to finish fingerprinting and for potential ECU knockouts
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  for (Panda *panda : pandas) {
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//    panda->set_safety_model(cereal::CarParams::SafetyModel::ELM327, 1U);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  }
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					//  p.putBool("ObdMultiplexingDisabled", true);
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  std::string params; | 
					 | 
					 | 
					 | 
					  std::string params; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  LOGW("waiting for params to set safety model"); | 
					 | 
					 | 
					 | 
					  LOGW("waiting for params to set safety model"); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  while (true) { | 
					 | 
					 | 
					 | 
					  while (true) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |