@ -1273,6 +1273,8 @@ static void curses_print_devstatus(int thr_id)
char logline [ 255 ] ;
char logline [ 255 ] ;
cgpu - > utility = cgpu - > accepted / ( total_secs ? total_secs : 1 ) * 60 ;
cgpu - > utility = cgpu - > accepted / ( total_secs ? total_secs : 1 ) * 60 ;
if ( total_devices > 8 )
return ;
mvwprintw ( statuswin , devcursor + cgpu - > cgminer_id , 0 , " %s %d: " , cgpu - > api - > name , cgpu - > device_id ) ;
mvwprintw ( statuswin , devcursor + cgpu - > cgminer_id , 0 , " %s %d: " , cgpu - > api - > name , cgpu - > device_id ) ;
if ( cgpu - > api - > get_statline_before ) {
if ( cgpu - > api - > get_statline_before ) {
@ -1280,6 +1282,7 @@ static void curses_print_devstatus(int thr_id)
cgpu - > api - > get_statline_before ( logline , cgpu ) ;
cgpu - > api - > get_statline_before ( logline , cgpu ) ;
wprintw ( statuswin , " %s " , logline ) ;
wprintw ( statuswin , " %s " , logline ) ;
}
}
if ( cgpu - > status = = LIFE_DEAD )
if ( cgpu - > status = = LIFE_DEAD )
wprintw ( statuswin , " DEAD " ) ;
wprintw ( statuswin , " DEAD " ) ;
else if ( cgpu - > status = = LIFE_SICK )
else if ( cgpu - > status = = LIFE_SICK )
@ -4572,7 +4575,18 @@ int main (int argc, char *argv[])
load_temp_cutoffs ( ) ;
load_temp_cutoffs ( ) ;
if ( total_devices < = 8 ) {
logstart + = total_devices ;
logstart + = total_devices ;
} else {
applog ( LOG_NOTICE , " Too many devices exist for per-device status lines " ) ;
for ( i = 0 ; i < total_devices ; + + i ) {
struct cgpu_info * cgpu = devices [ i ] ;
applog ( LOG_NOTICE , " %s%d: %s " , cgpu - > api - > name , cgpu - > device_id ,
cgpu - > deven = = DEV_ENABLED ? " Enabled " : " Disabled " ) ;
}
applog ( LOG_NOTICE , " %d devices found, disabling per-device status lines " , total_devices ) ;
}
logcursor = logstart + 1 ;
logcursor = logstart + 1 ;
# ifdef HAVE_CURSES
# ifdef HAVE_CURSES