Skip to content

Commit

Permalink
closes #26: per device temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
selaux committed Feb 16, 2014
1 parent a3ab3d4 commit 3a951f8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 2 additions & 1 deletion lib/modules/miners/bfgminer.js
Expand Up @@ -175,7 +175,8 @@ module.exports = Module.extend({
description: rawDev.Name,
avgHashrate: rawDev[avgHashrateKey],
hardwareErrors: rawDev['Hardware Errors'],
hardwareErrorRate: hardwareErrorRate
hardwareErrorRate: hardwareErrorRate,
temperature: rawDev.Temperature
};
});
},
Expand Down
5 changes: 4 additions & 1 deletion templates/miner.hbs
Expand Up @@ -77,7 +77,10 @@
<td class="{{#if connected}}success{{else}}danger{{/if}}">Device {{id}}</td>
<td>{{description}}</td>
<td>{{hashrate avgHashrate}}</td>
<td>{{number hardwareErrorRate precision="2"}}% Hardware Error Rate</td>
{{#if temperature}}
<td>{{number temperature precision="1"}}&deg;C</td>
{{/if}}
<td>{{number hardwareErrorRate precision="2"}}% HW Error Rate</td>
</tr>
</table>
</div>
Expand Down
12 changes: 8 additions & 4 deletions test/specs/lib/modules/miners/bfgminerSpec.js
Expand Up @@ -356,15 +356,17 @@ describe('modules/miners/bfgminer', function () {
'Name': 'One Mining Device',
'Hardware Errors': 1,
'Accepted': 2,
'MHS 100s': 3
'MHS 100s': 3,
'Temperature': 40
},
{
'Status': 'Other Status',
'ID': 1,
'Name': 'Different Mining Device',
'Hardware Errors': 4,
'Accepted': 16,
'MHS 300s': 9
'MHS 300s': 9,
'Temperature': 50
}
]
},
Expand All @@ -375,15 +377,17 @@ describe('modules/miners/bfgminer', function () {
description: 'One Mining Device',
hardwareErrors: 1,
hardwareErrorRate: 50,
avgHashrate: 3
avgHashrate: 3,
temperature: 40
},
{
connected: false,
id: 1,
description: 'Different Mining Device',
hardwareErrors: 4,
hardwareErrorRate: 25,
avgHashrate: 9
avgHashrate: 9,
temperature: 50
}
];

Expand Down

0 comments on commit 3a951f8

Please sign in to comment.