mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 04:54:26 +00:00
Display fan percentage on devices that only support reporting percent and not RPM.
This commit is contained in:
parent
d42211f09a
commit
863488e3d0
16
main.c
16
main.c
@ -1818,12 +1818,15 @@ static void get_statline(char *buf, struct cgpu_info *cgpu)
|
||||
int gpu = cgpu->cpu_gpu;
|
||||
float gt = gpu_temp(gpu);
|
||||
int gf = gpu_fanspeed(gpu);
|
||||
int gp = gpu_fanpercent(gpu);
|
||||
|
||||
if (gt != -1)
|
||||
tailsprintf(buf, "%.1fC ", gt);
|
||||
if (gf != -1)
|
||||
tailsprintf(buf, "%dRPM ", gf);
|
||||
if (gt || gf)
|
||||
else if (gp != -1)
|
||||
tailsprintf(buf, "%d%% ", gp);
|
||||
if (gt > -1 || gf > -1 || gp > -1)
|
||||
tailsprintf(buf, "| ");
|
||||
}
|
||||
#endif
|
||||
@ -1892,12 +1895,15 @@ static void curses_print_devstatus(int thr_id)
|
||||
if (cgpu->has_adl) {
|
||||
float gt = gpu_temp(gpu);
|
||||
int gf = gpu_fanspeed(gpu);
|
||||
int gp = gpu_fanpercent(gpu);
|
||||
|
||||
if (gt != -1)
|
||||
wprintw(statuswin, "%.1fC ", gt);
|
||||
if (gf != -1)
|
||||
wprintw(statuswin, "%4dRPM ", gf);
|
||||
if (gt || gf)
|
||||
else if (gp != -1)
|
||||
wprintw(statuswin, "%2d%% ", gp);
|
||||
if (gt > -1 || gf > -1 || gp > -1)
|
||||
wprintw(statuswin, "| ");
|
||||
}
|
||||
#endif
|
||||
@ -3131,11 +3137,13 @@ retry:
|
||||
strcpy(logline, ""); // In case it has no data
|
||||
if (temp != -1)
|
||||
sprintf(logline, "%.1f C ", temp);
|
||||
if (fanspeed != -1) {
|
||||
if (fanspeed != -1 || fanpercent != -1) {
|
||||
tailsprintf(logline, "F: ");
|
||||
if (fanpercent != -1)
|
||||
tailsprintf(logline, "%d%% ", fanpercent);
|
||||
tailsprintf(logline, "(%d RPM) ", fanspeed);
|
||||
if (fanspeed != -1)
|
||||
tailsprintf(logline, "(%d RPM) ", fanspeed);
|
||||
tailsprintf(logline, " ");
|
||||
}
|
||||
if (engineclock != -1)
|
||||
tailsprintf(logline, "E: %d MHz ", engineclock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user