Browse Source

Bugfix: twinfury: Populate temperature info on both processors

Luke Dashjr 12 years ago
parent
commit
495c4d6883
1 changed files with 4 additions and 3 deletions
  1. 4 3
      driver-twinfury.c

+ 4 - 3
driver-twinfury.c

@@ -419,14 +419,15 @@ void twinfury_poll(struct thr_info *thr)
 		{
 			if(response[0] == buffer[0])
 			{
-				uint16_t temp = response[4] | (response[5] << 8);
+				const float temp = ((uint16_t)response[4] | (uint16_t)(response[5] << 8)) / 10.0;
 				char hex[93];
 				bin2hex(hex, response, 8);
 				applog(LOG_DEBUG, "%"PRIpreprv": TEMP: %s",
 					   dev->dev_repr, hex);
 
-				dev->temp = (float)temp / 10.0;
-				applog(LOG_DEBUG, "%"PRIpreprv": Temperature: %f", dev->dev_repr, dev->temp);
+				for (struct cgpu_info *proc = dev; proc; proc = proc->next_proc)
+					proc->temp = temp;
+				applog(LOG_DEBUG, "%"PRIpreprv": Temperature: %f", dev->dev_repr, temp);
 			}
 		}
 		else