ac_set_state temperature clamping
This commit is contained in:
		
							parent
							
								
									36a5af164e
								
							
						
					
					
						commit
						98ea13a3dd
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -699,6 +699,10 @@ void ac_set_state(int mode, int temperature, int fan_speed)
 | 
			
		|||
{
 | 
			
		||||
  ac_mode = mode;
 | 
			
		||||
  ac_temperature = temperature;
 | 
			
		||||
  if (ac_temperature<AC_MIN_TEMPERATURE)
 | 
			
		||||
  ac_temperature = AC_MIN_TEMPERATURE;
 | 
			
		||||
  else if(ac_temperature >AC_MAX_TEMPERATURE)
 | 
			
		||||
  ac_temperature=AC_MAX_TEMPERATURE;
 | 
			
		||||
  ac_fan_speed = fan_speed;
 | 
			
		||||
  temperature -= AC_MIN_TEMPERATURE;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue