Remove the GPU junk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187
diff --git a/miner.php b/miner.php
index 6d4d210..b81f0e6 100644
--- a/miner.php
+++ b/miner.php
@@ -1321,15 +1321,6 @@ function fmt($section, $name, $value, $when, $alldata, $cf = NULL)
$ret = ' ';
break;
}
- case 'GPU Clock':
- case 'Memory Clock':
- case 'GPU Voltage':
- case 'GPU Activity':
- if ($section == 'total')
- break;
- if ($value == 0)
- $class = $warnclass;
- break;
case 'Fan Percent':
if ($section == 'total')
break;
@@ -1488,8 +1479,6 @@ function fmt($section, $name, $value, $when, $alldata, $cf = NULL)
// BUTTON.
case 'Rig':
case 'Pool':
- case 'GPU':
- break;
// Sample GEN fields
case 'Mined':
if ($value != '')
@@ -1733,102 +1722,6 @@ function details($cmd, $list, $rig)
global $devs;
$devs = null;
#
-function gpubuttons($count, $rig)
-{
- global $devs;
-
- $basic = array( 'GPU', 'Enable', 'Disable', 'Restart' );
-
- $options = array( 'intensity' => 'Intensity',
- 'fan' => 'Fan Percent',
- 'engine' => 'GPU Clock',
- 'mem' => 'Memory Clock',
- 'vddc' => 'GPU Voltage' );
-
- newtable();
- newrow();
-
- foreach ($basic as $head)
- echo "<td class=h>$head</td>";
-
- foreach ($options as $name => $des)
- echo "<td class=h nowrap>$des</td>";
-
- $n = 0;
- for ($c = 0; $c < $count; $c++)
- {
- endrow();
- newrow();
-
- foreach ($basic as $name)
- {
- list($ignore, $class) = fmt('BUTTON', 'GPU', '', 0, null);
- echo "<td$class>";
-
- if ($name == 'GPU')
- echo $c;
- else
- {
- echo "<input type=button value='$name $c' onclick='prs(\"gpu";
- echo strtolower($name);
- echo "|$c\",$rig)'>";
- }
-
- echo '</td>';
- }
-
- foreach ($options as $name => $des)
- {
- list($ignore, $class) = fmt('BUTTON', 'GPU', '', 0, null);
- echo "<td$class>";
-
- if (!isset($devs["GPU$c"][$des]))
- echo ' ';
- else
- {
- $value = $devs["GPU$c"][$des];
- echo "<input type=button value='Set $c:' onclick='prs2(\"gpu$name|$c\",$n,$rig)'>";
- echo "<input size=7 type=text name=gi$n value='$value' id=gi$n>";
- $n++;
- }
-
- echo '</td>';
- }
-
- }
- endrow();
- endtable();
-}
-#
-function processgpus($rig)
-{
- global $error;
- global $warnfont, $warnoff;
-
- $gpus = api($rig, 'gpucount');
-
- if ($error != null)
- otherrow("<td>Error getting GPU count: $warnfont$error$warnoff</td>");
- else
- {
- if (!isset($gpus['GPUS']['Count']))
- {
- $rw = '<td>No GPU count returned: '.$warnfont;
- $rw .= $gpus['STATUS']['STATUS'].' '.$gpus['STATUS']['Msg'];
- $rw .= $warnoff.'</td>';
- otherrow($rw);
- }
- else
- {
- $count = $gpus['GPUS']['Count'];
- if ($count == 0)
- otherrow('<td>No GPUs</td>');
- else
- gpubuttons($count, $rig);
- }
- }
-}
-#
function showpoolinputs($rig, $ans)
{
global $readonly, $poolinputs;
@@ -2121,16 +2014,13 @@ function doOne($rig, $preprocess)
process($cmds, $rig);
- if ($haderror == false && $readonly === false)
- processgpus($rig);
-
if ($placebuttons == 'bot' || $placebuttons == 'both')
pagebuttons($rig, null);
}
#
global $sectionmap;
# map sections to their api command
-# DEVS is a special case that will match GPU, PGA or ASC
+# DEVS is a special case that will match PGA or ASC
# so you can have a single table with both in it
# DATE is hard coded so not in here
$sectionmap = array(
@@ -2139,7 +2029,6 @@ $sectionmap = array(
'POOL' => 'pools',
'DEVS' => 'devs',
'EDEVS' => 'edevs',
- 'GPU' => 'devs', // You would normally use DEVS
'PGA' => 'devs', // You would normally use DEVS
'ASC' => 'devs', // You would normally use DEVS
'NOTIFY' => 'notify',
@@ -2327,19 +2216,6 @@ function joinsections($sections, $results, $errors)
{
global $sectionmap;
- // GPU's don't have Name,ID fields - so create them
- foreach ($results as $section => $res)
- foreach ($res as $rig => $result)
- foreach ($result as $name => $fields)
- {
- $subname = preg_replace('/[0-9]/', '', $name);
- if ($subname == 'GPU' and isset($result[$name]['GPU']))
- {
- $results[$section][$rig][$name]['Name'] = 'GPU';
- $results[$section][$rig][$name]['ID'] = $result[$name]['GPU'];
- }
- }
-
foreach ($sections as $section => $fields)
if ($section != 'DATE' && !isset($sectionmap[$section]))
{
@@ -2417,7 +2293,7 @@ function secmatch($section, $field)
return true;
if (($section == 'DEVS' || $section == 'EDEVS')
- && ($field == 'GPU' || $field == 'PGA' || $field == 'ASC'))
+ && ($field == 'PGA' || $field == 'ASC'))
return true;
return false;