1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 23:08:07 +00:00

ztex: Display FPGA clock frequency with only one decimal

This commit is contained in:
Denis Ahrens 2012-11-26 02:34:27 +01:00
parent 1c204dc927
commit 4629553ad6
2 changed files with 3 additions and 3 deletions

View File

@ -348,7 +348,7 @@ static void ztex_statline_before(char *buf, struct cgpu_info *cgpu)
{
if (cgpu->deven == DEV_ENABLED) {
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));
tailsprintf(buf, "%0.1fMHz | ", cgpu->device_ztex->freqM1 * (cgpu->device_ztex->freqM + 1));
}
}

View File

@ -383,10 +383,10 @@ int libztex_setFreq(struct libztex_device *ztex, uint16_t freq) {
}
ztex->freqM = freq;
if (oldfreq > ztex->freqMaxM)
applog(LOG_WARNING, "%s: Frequency set to %0.2f Mhz",
applog(LOG_WARNING, "%s: Frequency set to %0.1f MHz",
ztex->repr, ztex->freqM1 * (ztex->freqM + 1));
else
applog(LOG_WARNING, "%s: Frequency change from %0.2f to %0.2f Mhz",
applog(LOG_WARNING, "%s: Frequency change from %0.1f to %0.1f MHz",
ztex->repr, ztex->freqM1 * (oldfreq + 1), ztex->freqM1 * (ztex->freqM + 1));
return 0;