| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -276,7 +276,8 @@ def thermald_thread(): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # If device is offroad we want to cool down before going onroad | 
					 | 
					 | 
					 | 
					    # If device is offroad we want to cool down before going onroad | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # since going onroad increases load and can make temps go over 107 | 
					 | 
					 | 
					 | 
					    # since going onroad increases load and can make temps go over 107 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # We only do this if there is a relay that prevents the car from faulting | 
					 | 
					 | 
					 | 
					    # We only do this if there is a relay that prevents the car from faulting | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if max_cpu_temp > 107. or bat_temp >= 63. or (has_relay and (started_ts is None) and max_cpu_temp > 70.0): | 
					 | 
					 | 
					 | 
					    is_offroad_for_5_min = (started_ts is None) and ((not started_seen) or (off_ts is None) or (sec_since_boot() - off_ts > 60 * 5)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    if max_cpu_temp > 107. or bat_temp >= 63. or (has_relay and is_offroad_for_5_min and max_cpu_temp > 70.0): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      # onroad not allowed | 
					 | 
					 | 
					 | 
					      # onroad not allowed | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      thermal_status = ThermalStatus.danger | 
					 | 
					 | 
					 | 
					      thermal_status = ThermalStatus.danger | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    elif max_comp_temp > 96.0 or bat_temp > 60.: | 
					 | 
					 | 
					 | 
					    elif max_comp_temp > 96.0 or bat_temp > 60.: | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |