Commit 836b76a0d6936adc933cc852db5f9c42375517ae

Kano 2012-06-14T03:14:02

api.c MMQ stat bugs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/api.c b/api.c
index df7b7e1..f5ec82c 100644
--- a/api.c
+++ b/api.c
@@ -912,11 +912,11 @@ static void pgastatus(int pga, bool isjson)
 			for (i = 0; i < tc; i++) {
 				struct thr_info *thr = cgpu->thr[i];
 				struct modminer_fpga_state *state = thr->cgpu_data;
-				if (temp && ((state->temp + 0x30) > temp))
-					temp = state->temp + 0x30;
+				if (state->temp > temp)
+					temp = state->temp;
 				frequency += state->clock;
 			}
-			frequency /= tc;
+			frequency /= (tc ? tc : 1);
 		}
 #endif