mirror of
https://github.com/GOSTSec/sgminer
synced 2025-02-02 10:04:33 +00:00
Add more hysteresis and poll ~5 times to allow for timer delays in bitforce devices.
This commit is contained in:
parent
afc6ae58a5
commit
a3faf63c96
@ -370,10 +370,11 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work)
|
|||||||
} else if (!strncasecmp(pdevbuf, "N", 1)) {/* Hashing complete (NONCE-FOUND or NO-NONCE) */
|
} else if (!strncasecmp(pdevbuf, "N", 1)) {/* Hashing complete (NONCE-FOUND or NO-NONCE) */
|
||||||
/* Simple timing adjustment */
|
/* Simple timing adjustment */
|
||||||
delay_time_ms = bitforce->sleep_ms;
|
delay_time_ms = bitforce->sleep_ms;
|
||||||
if (bitforce->wait_ms > (bitforce->sleep_ms + BITFORCE_CHECK_INTERVAL_MS))
|
if (bitforce->wait_ms > bitforce->sleep_ms + (WORK_CHECK_INTERVAL_MS * 2))
|
||||||
bitforce->sleep_ms += (unsigned int) ((double) (bitforce->wait_ms - bitforce->sleep_ms) / 1.6);
|
bitforce->sleep_ms += (bitforce->wait_ms - bitforce->sleep_ms) / 2;
|
||||||
else if (bitforce->wait_ms == bitforce->sleep_ms)
|
else if (bitforce->wait_ms > bitforce->sleep_ms - WORK_CHECK_INTERVAL_MS &&
|
||||||
bitforce->sleep_ms -= WORK_CHECK_INTERVAL_MS;
|
bitforce->wait_ms <= bitforce->sleep_ms)
|
||||||
|
bitforce->sleep_ms -= BITFORCE_CHECK_INTERVAL_MS;
|
||||||
|
|
||||||
if (delay_time_ms != bitforce->sleep_ms)
|
if (delay_time_ms != bitforce->sleep_ms)
|
||||||
applog(LOG_DEBUG, "BFL%i: Wait time changed to: %d", bitforce->device_id, bitforce->sleep_ms, bitforce->wait_ms);
|
applog(LOG_DEBUG, "BFL%i: Wait time changed to: %d", bitforce->device_id, bitforce->sleep_ms, bitforce->wait_ms);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user