Commit 86b59c4724e9ed731c15b0f63f33421e202a3d03

Con Kolivas 2013-05-30T10:05:16

Add ambient temp and lowest fan RPM information to avalon statline.

diff --git a/driver-avalon.c b/driver-avalon.c
index caba8b5..d4aaf25 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -987,18 +987,21 @@ static void avalon_update_temps(struct cgpu_info *avalon, struct avalon_info *in
 static void get_avalon_statline_before(char *buf, struct cgpu_info *avalon)
 {
 	struct avalon_info *info = avalon->device_data;
-	int temp = 0, pwm = 0;
+	int lowfan = 0, pwm;
 
-	if (info->temp0 > temp)
-		temp = info->temp0;
-	if (info->temp1 > temp)
-		temp = info->temp1;
-	if (info->temp2 > temp)
-		temp = info->temp2;
+	/* Find the lowest fan speed */
+	if (info->fan0 >= 0)
+		lowfan = info->fan0;
+	if (info->fan1 >= 0 && info->fan1 < lowfan)
+		lowfan = info->fan1;
+	if (info->fan2 >= 0 && info->fan2 < lowfan)
+		lowfan = info->fan2;
+	lowfan *= AVALON_FAN_FACTOR;
 
 	pwm = info->fan_pwm * 100 / AVALON_DEFAULT_FAN_MAX_PWM;
 
-	tailsprintf(buf, " max %3dC %3d%% | ", temp, pwm);
+	tailsprintf(buf, "%2d/%3dC %3d%%/%4dR| ", info->temp0, info->temp2,
+		    pwm, lowfan);
 }
 
 /* We use a replacement algorithm to only remove references to work done from