|  |  | @ -33,6 +33,7 @@ LANE_DEPARTURE_THRESHOLD = 0.1 | 
			
		
	
		
		
			
				
					
					|  |  |  | STEER_ANGLE_SATURATION_TIMEOUT = 1.0 / DT_CTRL |  |  |  | STEER_ANGLE_SATURATION_TIMEOUT = 1.0 / DT_CTRL | 
			
		
	
		
		
			
				
					
					|  |  |  | STEER_ANGLE_SATURATION_THRESHOLD = 2.5  # Degrees |  |  |  | STEER_ANGLE_SATURATION_THRESHOLD = 2.5  # Degrees | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | REPLAY = "REPLAY" in os.environ | 
			
		
	
		
		
			
				
					
					|  |  |  | SIMULATION = "SIMULATION" in os.environ |  |  |  | SIMULATION = "SIMULATION" in os.environ | 
			
		
	
		
		
			
				
					
					|  |  |  | NOSENSOR = "NOSENSOR" in os.environ |  |  |  | NOSENSOR = "NOSENSOR" in os.environ | 
			
		
	
		
		
			
				
					
					|  |  |  | IGNORE_PROCESSES = {"rtshield", "uploader", "deleter", "loggerd", "logmessaged", "tombstoned", |  |  |  | IGNORE_PROCESSES = {"rtshield", "uploader", "deleter", "loggerd", "logmessaged", "tombstoned", | 
			
		
	
	
		
		
			
				
					|  |  | @ -291,11 +292,12 @@ class Controls: | 
			
		
	
		
		
			
				
					
					|  |  |  |       if log.PandaState.FaultType.relayMalfunction in pandaState.faults: |  |  |  |       if log.PandaState.FaultType.relayMalfunction in pandaState.faults: | 
			
		
	
		
		
			
				
					
					|  |  |  |         self.events.add(EventName.relayMalfunction) |  |  |  |         self.events.add(EventName.relayMalfunction) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     # Check for mismatch between openpilot and car's PCM |  |  |  |     if not REPLAY: | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     cruise_mismatch = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise) |  |  |  |       # Check for mismatch between openpilot and car's PCM | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     self.cruise_mismatch_counter = self.cruise_mismatch_counter + 1 if cruise_mismatch else 0 |  |  |  |       cruise_mismatch = CS.cruiseState.enabled and (not self.enabled or not self.CP.pcmCruise) | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |     if self.cruise_mismatch_counter > int(1. / DT_CTRL): |  |  |  |       self.cruise_mismatch_counter = self.cruise_mismatch_counter + 1 if cruise_mismatch else 0 | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |       self.events.add(EventName.cruiseMismatch) |  |  |  |       if self.cruise_mismatch_counter > int(1. / DT_CTRL): | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         self.events.add(EventName.cruiseMismatch) | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     # Check for FCW |  |  |  |     # Check for FCW | 
			
		
	
		
		
			
				
					
					|  |  |  |     stock_long_is_braking = self.enabled and not self.CP.openpilotLongitudinalControl and CS.aEgo < -1.5 |  |  |  |     stock_long_is_braking = self.enabled and not self.CP.openpilotLongitudinalControl and CS.aEgo < -1.5 | 
			
		
	
	
		
		
			
				
					|  |  | 
 |