Browse Source

bflsc guess device ~based on current V1 Jalapeno engine count

nfactor-troky
Kano 12 years ago
parent
commit
55b3d407c5
  1. 32
      driver-bflsc.c

32
driver-bflsc.c

@ -852,6 +852,9 @@ reinit:
sc_info->results_sleep_time = BAS_RES_TIME; sc_info->results_sleep_time = BAS_RES_TIME;
sc_info->default_ms_work = BAS_WORK_TIME; sc_info->default_ms_work = BAS_WORK_TIME;
/* When getinfo() "FREQUENCY: [UNKNOWN]" is fixed -
* use 'freq * engines' to estimate.
* Otherwise for now: */
newname = NULL; newname = NULL;
if (sc_info->sc_count > 1) { if (sc_info->sc_count > 1) {
newname = BFLSC_MINIRIG; newname = BFLSC_MINIRIG;
@ -859,23 +862,16 @@ reinit:
sc_info->results_sleep_time = BAM_RES_TIME; sc_info->results_sleep_time = BAM_RES_TIME;
sc_info->default_ms_work = BAM_WORK_TIME; sc_info->default_ms_work = BAM_WORK_TIME;
} else { } else {
switch (sc_info->sc_devs[0].engines) { if (sc_info->sc_devs[0].engines < 34) { // 16 * 2 + 2
case 1: newname = BFLSC_JALAPENO;
newname = BFLSC_JALAPENO; sc_info->scan_sleep_time = BAJ_SCAN_TIME;
sc_info->scan_sleep_time = BAJ_SCAN_TIME; sc_info->results_sleep_time = BAJ_RES_TIME;
sc_info->results_sleep_time = BAJ_RES_TIME; sc_info->default_ms_work = BAJ_WORK_TIME;
sc_info->default_ms_work = BAJ_WORK_TIME; } else if (sc_info->sc_devs[0].engines < 130) { // 16 * 8 + 2
break; newname = BFLSC_LITTLESINGLE;
case 2: sc_info->scan_sleep_time = BAL_SCAN_TIME;
case 3: sc_info->results_sleep_time = BAL_RES_TIME;
case 4: sc_info->default_ms_work = BAL_WORK_TIME;
newname = BFLSC_LITTLESINGLE;
sc_info->scan_sleep_time = BAL_SCAN_TIME;
sc_info->results_sleep_time = BAL_RES_TIME;
sc_info->default_ms_work = BAL_WORK_TIME;
break;
default:
break;
} }
} }
@ -888,8 +884,6 @@ reinit:
bflsc->drv->name = newname; bflsc->drv->name = newname;
} }
// Do a performance test of a nonce? (and set ms_work)
// We have a real BFLSC! // We have a real BFLSC!
applog(LOG_DEBUG, "%s (%s) identified as: '%s'", applog(LOG_DEBUG, "%s (%s) identified as: '%s'",
bflsc->drv->dname, devpath, bflsc->drv->name); bflsc->drv->dname, devpath, bflsc->drv->name);

Loading…
Cancel
Save