|
|
|
@ -987,18 +987,21 @@ static void avalon_update_temps(struct cgpu_info *avalon, struct avalon_info *in
@@ -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
|
|
|
|
|