mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-22 20:44:19 +00:00
Damp the display of voltage for BFLSC devices.
This commit is contained in:
parent
d6720ee0aa
commit
31fc0bc766
@ -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) {
|
||||||
sc_info->sc_devs[dev].vcc1 = vcc1;
|
if (unlikely(sc_info->sc_devs[dev].vcc1 == 0))
|
||||||
if (vcc2 > 0)
|
sc_info->sc_devs[dev].vcc1 = vcc1;
|
||||||
sc_info->sc_devs[dev].vcc2 = vcc2;
|
else {
|
||||||
if (vmain > 0)
|
sc_info->sc_devs[dev].vcc1 += vcc1 * 0.63;
|
||||||
sc_info->sc_devs[dev].vmain = vmain;
|
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;
|
||||||
|
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;
|
||||||
|
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…
x
Reference in New Issue
Block a user