|  |  | @ -1,6 +1,7 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | import os |  |  |  | import os | 
			
		
	
		
		
			
				
					
					|  |  |  | from common.params import Params |  |  |  | from common.params import Params | 
			
		
	
		
		
			
				
					
					|  |  |  | from common.basedir import BASEDIR |  |  |  | from common.basedir import BASEDIR | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | from selfdrive.version import comma_remote, tested_branch | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars |  |  |  | from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_known_cars | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.car.vin import get_vin, VIN_UNKNOWN |  |  |  | from selfdrive.car.vin import get_vin, VIN_UNKNOWN | 
			
		
	
		
		
			
				
					
					|  |  |  | from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car |  |  |  | from selfdrive.car.fw_versions import get_fw_versions, match_fw_to_car | 
			
		
	
	
		
		
			
				
					|  |  | @ -13,11 +14,12 @@ EventName = car.CarEvent.EventName | 
			
		
	
		
		
			
				
					
					|  |  |  | HwType = log.HealthData.HwType |  |  |  | HwType = log.HealthData.HwType | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | def get_startup_event(car_recognized, controller_available, hw_type): |  |  |  | def get_startup_event(car_recognized, controller_available): | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   event = EventName.startup |  |  |  |   if comma_remote and tested_branch: | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |   if Params().get("GitRemote", encoding="utf8") in ['git@github.com:commaai/openpilot.git', 'https://github.com/commaai/openpilot.git']: |  |  |  |     event = EventName.startup | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     if Params().get("GitBranch", encoding="utf8") not in ['devel', 'release2-staging', 'dashcam-staging', 'release2', 'dashcam']: |  |  |  |   else: | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       event = EventName.startupMaster |  |  |  |     event = EventName.startupMaster | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   if not car_recognized: |  |  |  |   if not car_recognized: | 
			
		
	
		
		
			
				
					
					|  |  |  |     event = EventName.startupNoCar |  |  |  |     event = EventName.startupNoCar | 
			
		
	
		
		
			
				
					
					|  |  |  |   elif car_recognized and not controller_available: |  |  |  |   elif car_recognized and not controller_available: | 
			
		
	
	
		
		
			
				
					|  |  | 
 |