| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -504,9 +504,9 @@ class Controls: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.soft_disable_timer = int(SOFT_DISABLE_TIME / DT_CTRL) | 
					 | 
					 | 
					 | 
					            self.soft_disable_timer = int(SOFT_DISABLE_TIME / DT_CTRL) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.SOFT_DISABLE) | 
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.SOFT_DISABLE) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          elif self.events.any(ET.OVERRIDE): | 
					 | 
					 | 
					 | 
					          elif self.events.any(ET.OVERRIDE_LAT) or self.events.any(ET.OVERRIDE_LONG): | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.overriding | 
					 | 
					 | 
					 | 
					            self.state = State.overriding | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.OVERRIDE) | 
					 | 
					 | 
					 | 
					            self.current_alert_types += [ET.OVERRIDE_LAT, ET.OVERRIDE_LONG] | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        # SOFT DISABLING | 
					 | 
					 | 
					 | 
					        # SOFT DISABLING | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        elif self.state == State.softDisabling: | 
					 | 
					 | 
					 | 
					        elif self.state == State.softDisabling: | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -536,10 +536,10 @@ class Controls: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.softDisabling | 
					 | 
					 | 
					 | 
					            self.state = State.softDisabling | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.soft_disable_timer = int(SOFT_DISABLE_TIME / DT_CTRL) | 
					 | 
					 | 
					 | 
					            self.soft_disable_timer = int(SOFT_DISABLE_TIME / DT_CTRL) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.SOFT_DISABLE) | 
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.SOFT_DISABLE) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          elif not self.events.any(ET.OVERRIDE): | 
					 | 
					 | 
					 | 
					          elif not (self.events.any(ET.OVERRIDE_LAT) or self.events.any(ET.OVERRIDE_LONG)): | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.enabled | 
					 | 
					 | 
					 | 
					            self.state = State.enabled | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          else: | 
					 | 
					 | 
					 | 
					          else: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.current_alert_types.append(ET.OVERRIDE) | 
					 | 
					 | 
					 | 
					            self.current_alert_types += [ET.OVERRIDE_LAT, ET.OVERRIDE_LONG] | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # DISABLED | 
					 | 
					 | 
					 | 
					    # DISABLED | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    elif self.state == State.disabled: | 
					 | 
					 | 
					 | 
					    elif self.state == State.disabled: | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -550,7 +550,7 @@ class Controls: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else: | 
					 | 
					 | 
					 | 
					        else: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          if self.events.any(ET.PRE_ENABLE): | 
					 | 
					 | 
					 | 
					          if self.events.any(ET.PRE_ENABLE): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.preEnabled | 
					 | 
					 | 
					 | 
					            self.state = State.preEnabled | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          elif self.events.any(ET.OVERRIDE): | 
					 | 
					 | 
					 | 
					          elif self.events.any(ET.OVERRIDE_LAT) or self.events.any(ET.OVERRIDE_LONG): | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.overriding | 
					 | 
					 | 
					 | 
					            self.state = State.overriding | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					          else: | 
					 | 
					 | 
					 | 
					          else: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            self.state = State.enabled | 
					 | 
					 | 
					 | 
					            self.state = State.enabled | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -582,7 +582,7 @@ class Controls: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # Check which actuators can be enabled | 
					 | 
					 | 
					 | 
					    # Check which actuators can be enabled | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ | 
					 | 
					 | 
					 | 
					    CC.latActive = self.active and not CS.steerFaultTemporary and not CS.steerFaultPermanent and \ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                     CS.vEgo > self.CP.minSteerSpeed and not CS.standstill | 
					 | 
					 | 
					 | 
					                     CS.vEgo > self.CP.minSteerSpeed and not CS.standstill | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    CC.longActive = self.active and not self.events.any(ET.OVERRIDE) and self.CP.openpilotLongitudinalControl | 
					 | 
					 | 
					 | 
					    CC.longActive = self.active and not self.events.any(ET.OVERRIDE_LONG) and self.CP.openpilotLongitudinalControl | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    actuators = CC.actuators | 
					 | 
					 | 
					 | 
					    actuators = CC.actuators | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    actuators.longControlState = self.LoC.long_control_state | 
					 | 
					 | 
					 | 
					    actuators.longControlState = self.LoC.long_control_state | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |