mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-08 22:08:02 +00:00
Some tweaks to reporting and logging.
- Adding fpga number to the ztex string representation - Removing usb details from the ztex string representation - First frequency set no longer reports a bogus old freq
This commit is contained in:
parent
eb60ca55f1
commit
ed60e33a94
@ -90,6 +90,7 @@ static void ztex_detect(void)
|
||||
ztex->threads = 1;
|
||||
ztex_slave->fpgaNum = j;
|
||||
ztex_slave->root = ztex_devices[i]->dev;
|
||||
ztex_slave->repr[strlen(ztex_slave->repr) - 1] = ('1' + j);
|
||||
add_cgpu(ztex);
|
||||
}
|
||||
|
||||
@ -346,7 +347,7 @@ static uint64_t ztex_scanhash(struct thr_info *thr, struct work *work,
|
||||
static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
|
||||
{
|
||||
if (cgpu->deven == DEV_ENABLED) {
|
||||
tailsprintf(buf, "%s | ", cgpu->device_ztex->snString);
|
||||
tailsprintf(buf, "%s-%d | ", cgpu->device_ztex->snString, cgpu->device_ztex->fpgaNum+1);
|
||||
tailsprintf(buf, "%0.2fMhz | ", cgpu->device_ztex->freqM1 * (cgpu->device_ztex->freqM + 1));
|
||||
}
|
||||
}
|
||||
@ -364,8 +365,9 @@ static bool ztex_prepare(struct thr_info *thr)
|
||||
if (libztex_configureFpga(ztex) != 0)
|
||||
return false;
|
||||
ztex_releaseFpga(ztex);
|
||||
ztex->freqM = -1;
|
||||
ztex_updateFreq(ztex);
|
||||
ztex->freqM = ztex->freqMaxM+1;;
|
||||
//ztex_updateFreq(ztex);
|
||||
libztex_setFreq(ztex, ztex->freqMDefault);
|
||||
applog(LOG_DEBUG, "%s: prepare", ztex->repr);
|
||||
return true;
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ int libztex_setFreq(struct libztex_device *ztex, uint16_t freq) {
|
||||
return cnt;
|
||||
}
|
||||
ztex->freqM = freq;
|
||||
if (oldfreq == -1)
|
||||
if (oldfreq > ztex->freqMaxM)
|
||||
applog(LOG_WARNING, "%s: Frequency set to %0.2f Mhz",
|
||||
ztex->repr, ztex->freqM1 * (ztex->freqM + 1));
|
||||
else
|
||||
@ -535,7 +535,7 @@ int libztex_prepare_device(struct libusb_device *dev, struct libztex_device** zt
|
||||
|
||||
newdev->usbbus = libusb_get_bus_number(dev);
|
||||
newdev->usbaddress = libusb_get_device_address(dev);
|
||||
sprintf(newdev->repr, "ZTEX %.3d:%.3d-%s", newdev->usbbus, newdev->usbaddress, newdev->snString);
|
||||
sprintf(newdev->repr, "ZTEX %s-1", newdev->snString);
|
||||
newdev->valid = true;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user