Browse Source

Bugfix: Don't show a Temperature key if it isn't known

Luke Dashjr 13 years ago
parent
commit
6f1e8f5ea1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver-modminer.c

+ 2 - 1
driver-modminer.c

@@ -382,7 +382,8 @@ get_modminer_extra_device_status(struct cgpu_info*modminer)
 		struct modminer_fpga_state *state = thr->cgpu_data;
 		json_t *o = json_object();
 
-		json_object_set(o, "Temperature", json_integer(state->temp));
+		if (state->temp)
+			json_object_set(o, "Temperature", json_integer(state->temp));
 		json_object_set(o, "Frequency", json_real((double)state->clock * 1000000.));
 
 		k[5] = 0x30 + i;