Browse Source

miner.php: Include max temperature in device totals line

Luke Dashjr 12 years ago
parent
commit
ccd4c4c155
1 changed files with 7 additions and 1 deletions
  1. 7 1
      miner.php

+ 7 - 1
miner.php

@@ -994,6 +994,7 @@ function showdatetime()
 global $singlerigsum;
 global $singlerigsum;
 $singlerigsum = array(
 $singlerigsum = array(
  'devs' => array('MHS av' => 1, 'MHS 5s' => 1, 'Accepted' => 1, 'Rejected' => 1,
  'devs' => array('MHS av' => 1, 'MHS 5s' => 1, 'Accepted' => 1, 'Rejected' => 1,
+                 'Temperature' => 2,
 			'Hardware Errors' => 1, 'Utility' => 1, 'Total MH' => 1),
 			'Hardware Errors' => 1, 'Utility' => 1, 'Total MH' => 1),
  'pools' => array('Getworks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Discarded' => 1,
  'pools' => array('Getworks' => 1, 'Accepted' => 1, 'Rejected' => 1, 'Discarded' => 1,
 			'Stale' => 1, 'Get Failures' => 1, 'Remote Failures' => 1),
 			'Stale' => 1, 'Get Failures' => 1, 'Remote Failures' => 1),
@@ -1151,7 +1152,12 @@ function details($cmd, $list, $rig)
 		||  (isset($dototal['*']) and substr($name, 0, 1) == '*'))
 		||  (isset($dototal['*']) and substr($name, 0, 1) == '*'))
 		{
 		{
 			if (isset($total[$name]))
 			if (isset($total[$name]))
-				$total[$name] += $value;
+			{
+				if ($dototal[$name] == 2)
+					$total[$name] = max($total[$name], $value);
+				else
+					$total[$name] += $value;
+			}
 			else
 			else
 				$total[$name] = $value;
 				$total[$name] = $value;
 		}
 		}