Open kmitz opened 8 years ago
Yes. Noticed this before... This has worked thus far (has not been extensively tested).
For min:
if [ $maxtemp -gt $TMAX ] && [ $freq'' != "100" ]
For max:
elif [ $maxtemp -lt $TMIN ] && [ $freq'' != "500" ]
Actually I just noticed that grep -B (resp. grep -A) will return the first (resp. last) line of freqList when looking for "out of boundaries" values.
For instance: *input: FREQ_STEP=4; freq=100; newFreq=$(cat freqList | grep -A "$FREQ_STEP" "$freq:" | tail -n 1); echo $newFreq;
*output: 10 : 100 : 0783
It seems that the issue was (unintentionally) already taken care of! What do you think about it?
Looks correct. But won't it restart cgminer unnecessarily at this point?
That's right, I missed that point.
'newFreq' value can be incorrect when downclocking below 100MHz or when overclocking above 500MHz.
The issue is caused by these two lines: newFreq=$(cat freqList | grep -A "$FREQ_STEP" "$freq:" | tail -n 1) newFreq=$(cat freqList | grep -B "$FREQ_STEP" "$freq:" | head -n 1)
newFreq values shall be limited to the valid frequencies contained in Freqlist file.
I don't have my Antminer anymore so I won't issue the fix myself.