Browse Source

Damp the display of voltage for BFLSC devices.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
31fc0bc766
  1. 24
      driver-bflsc.c

24
driver-bflsc.c

@ -1100,12 +1100,30 @@ static bool bflsc_get_temp(struct cgpu_info *bflsc, int dev)
vmain = (float)atoi(fields[2]) / 1000.0; vmain = (float)atoi(fields[2]) / 1000.0;
if (vcc1 > 0 || vcc2 > 0 || vmain > 0) { if (vcc1 > 0 || vcc2 > 0 || vmain > 0) {
wr_lock(&(sc_info->stat_lock)); wr_lock(&(sc_info->stat_lock));
if (vcc1 > 0) if (vcc1 > 0) {
if (unlikely(sc_info->sc_devs[dev].vcc1 == 0))
sc_info->sc_devs[dev].vcc1 = vcc1; sc_info->sc_devs[dev].vcc1 = vcc1;
if (vcc2 > 0) else {
sc_info->sc_devs[dev].vcc1 += vcc1 * 0.63;
sc_info->sc_devs[dev].vcc1 /= 1.63;
}
}
if (vcc2 > 0) {
if (unlikely(sc_info->sc_devs[dev].vcc2 == 0))
sc_info->sc_devs[dev].vcc2 = vcc2; sc_info->sc_devs[dev].vcc2 = vcc2;
if (vmain > 0) else {
sc_info->sc_devs[dev].vcc2 += vcc2 * 0.63;
sc_info->sc_devs[dev].vcc2 /= 1.63;
}
}
if (vmain > 0) {
if (unlikely(sc_info->sc_devs[dev].vmain == 0))
sc_info->sc_devs[dev].vmain = vmain; sc_info->sc_devs[dev].vmain = vmain;
else {
sc_info->sc_devs[dev].vmain += vmain * 0.63;
sc_info->sc_devs[dev].vmain /= 1.63;
}
}
wr_unlock(&(sc_info->stat_lock)); wr_unlock(&(sc_info->stat_lock));
} }

Loading…
Cancel
Save