|
|
@ -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) |
|
|
|
static void get_avalon_statline_before(char *buf, struct cgpu_info *avalon) |
|
|
|
{ |
|
|
|
{ |
|
|
|
struct avalon_info *info = avalon->device_data; |
|
|
|
struct avalon_info *info = avalon->device_data; |
|
|
|
int temp = 0, pwm = 0; |
|
|
|
int lowfan = 0, pwm; |
|
|
|
|
|
|
|
|
|
|
|
if (info->temp0 > temp) |
|
|
|
/* Find the lowest fan speed */ |
|
|
|
temp = info->temp0; |
|
|
|
if (info->fan0 >= 0) |
|
|
|
if (info->temp1 > temp) |
|
|
|
lowfan = info->fan0; |
|
|
|
temp = info->temp1; |
|
|
|
if (info->fan1 >= 0 && info->fan1 < lowfan) |
|
|
|
if (info->temp2 > temp) |
|
|
|
lowfan = info->fan1; |
|
|
|
temp = info->temp2; |
|
|
|
if (info->fan2 >= 0 && info->fan2 < lowfan) |
|
|
|
|
|
|
|
lowfan = info->fan2; |
|
|
|
|
|
|
|
lowfan *= AVALON_FAN_FACTOR; |
|
|
|
|
|
|
|
|
|
|
|
pwm = info->fan_pwm * 100 / AVALON_DEFAULT_FAN_MAX_PWM; |
|
|
|
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
|
|
|
|
/* We use a replacement algorithm to only remove references to work done from
|
|
|
|