Browse Source

beta final 0.3.0 release

nfactor-troky
bkkcoins 11 years ago committed by Con Kolivas
parent
commit
1dc8ea76c6
  1. 9
      cgminer/driver-klondike.c

9
cgminer/driver-klondike.c

@ -215,7 +215,7 @@ static bool klondike_init(struct cgpu_info *klncgpu)
sscanf(opt_klondike_options, "%hu,%lf,%lf,%hhu", &cfgset.hashclock, &temp1, &temp2, &cfgset.fantarget); sscanf(opt_klondike_options, "%hu,%lf,%lf,%hhu", &cfgset.hashclock, &temp1, &temp2, &cfgset.fantarget);
cfgset.temptarget = cvtCToKln(temp1); cfgset.temptarget = cvtCToKln(temp1);
cfgset.tempcritical = cvtCToKln(temp2); cfgset.tempcritical = cvtCToKln(temp2);
cfgset.fantarget = (int)256*cfgset.fantarget/100; cfgset.fantarget = (int)255*cfgset.fantarget/100;
size = sizeof(cfgset); size = sizeof(cfgset);
} }
@ -532,6 +532,7 @@ static void get_klondike_statline_before(char *buf, struct cgpu_info *klncgpu)
{ {
struct klondike_info *klninfo = (struct klondike_info *)(klncgpu->device_data); struct klondike_info *klninfo = (struct klondike_info *)(klncgpu->device_data);
uint8_t temp = 0xFF; uint8_t temp = 0xFF;
uint16_t fan = 0;
int dev; int dev;
if(klninfo->status == NULL) if(klninfo->status == NULL)
@ -541,10 +542,12 @@ static void get_klondike_statline_before(char *buf, struct cgpu_info *klncgpu)
for (dev = 0; dev <= klninfo->status->slavecount; dev++) { for (dev = 0; dev <= klninfo->status->slavecount; dev++) {
if (klninfo->status[dev].temp < temp) if (klninfo->status[dev].temp < temp)
temp = klninfo->status[dev].temp; temp = klninfo->status[dev].temp;
fan += klninfo->cfg[dev].fantarget;
} }
fan /= klninfo->status->slavecount+1;
rd_unlock(&(klninfo->stat_lock)); rd_unlock(&(klninfo->stat_lock));
tailsprintf(buf, " %3.0fC 1.2V | ", cvtKlnToC(temp)); tailsprintf(buf, " %3.0fC %3d% | ", cvtKlnToC(temp), fan*100/255);
} }
static struct api_data *klondike_api_stats(struct cgpu_info *klncgpu) static struct api_data *klondike_api_stats(struct cgpu_info *klncgpu)
@ -568,7 +571,7 @@ static struct api_data *klondike_api_stats(struct cgpu_info *klncgpu)
sprintf(buf, "Clock %d", dev); sprintf(buf, "Clock %d", dev);
root = api_add_freq(root, buf, &dClk, true); root = api_add_freq(root, buf, &dClk, true);
unsigned int iFan = (unsigned int)100 * klninfo->cfg[dev].fantarget / 256; unsigned int iFan = (unsigned int)100 * klninfo->cfg[dev].fantarget / 255;
sprintf(buf, "Fan Percent %d", dev); sprintf(buf, "Fan Percent %d", dev);
root = api_add_int(root, buf, &iFan, true); root = api_add_int(root, buf, &iFan, true);

Loading…
Cancel
Save