Browse Source

the temp_history_count base on timeout

Xiangfu 13 years ago
parent
commit
4b7640a6a9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-avalon.c

+ 2 - 1
driver-avalon.c

@@ -563,7 +563,8 @@ static bool avalon_detect_one(const char *devpath)
 
 	info->fan_pwm = AVALON_DEFAULT_FAN_MIN_PWM;
 	info->temp_max = 0;
-	info->temp_history_count = (4 / (float)(0x3c * ((float)1.67/0x32))) + 1;
+	/* This is for check the temp/fan every 3~4s */
+	info->temp_history_count = (4 / (float)((float)info->timeout * ((float)1.67/0x32))) + 1;
 	if (info->temp_history_count <= 0)
 		info->temp_history_count = 1;