Browse Source

ztex: Display FPGA clock frequency with only one decimal

nfactor-troky
Denis Ahrens 12 years ago
parent
commit
4629553ad6
  1. 2
      driver-ztex.c
  2. 4
      libztex.c

2
driver-ztex.c

@ -348,7 +348,7 @@ static void ztex_statline_before(char *buf, struct cgpu_info *cgpu) @@ -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));
}
}

4
libztex.c

@ -383,10 +383,10 @@ int libztex_setFreq(struct libztex_device *ztex, uint16_t freq) { @@ -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;

Loading…
Cancel
Save