Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51abdf0b2d | ||
|
|
b367b2d293 | ||
|
|
96f52a4b35 | ||
|
|
5236e02af2 |
@@ -308,6 +308,12 @@ class FanModeConfig(MinerConfigOption):
|
||||
if "minimumRequiredFans" in keys:
|
||||
conf["minimum_fans"] = int(temperature_conf["minimumRequiredFans"])
|
||||
return cls.manual(**conf)
|
||||
if "disabled" in keys:
|
||||
conf = {}
|
||||
if "fanSpeedRatio" in temperature_conf["disabled"].keys():
|
||||
conf["speed"] = int(temperature_conf["disabled"]["fanSpeedRatio"])
|
||||
return cls.manual(**conf)
|
||||
return cls.default()
|
||||
|
||||
@classmethod
|
||||
def from_auradine(cls, web_fan: dict):
|
||||
|
||||
@@ -229,7 +229,7 @@ class BlackMiner(StockFirmware):
|
||||
hashrate = boards[1].get(f"chain_rate{i}")
|
||||
if hashrate:
|
||||
hashboard.hashrate = self.algo.hashrate(
|
||||
rate=float(hashrate), unit=self.algo.unit.GH
|
||||
rate=float(hashrate), unit=self.algo.unit.MH
|
||||
).into(self.algo.unit.default)
|
||||
|
||||
chips = boards[1].get(f"chain_acn{i}")
|
||||
@@ -358,7 +358,7 @@ class BlackMiner(StockFirmware):
|
||||
try:
|
||||
expected_rate = rpc_stats["STATS"][1].get("total_rateideal")
|
||||
if expected_rate is None:
|
||||
return self.sticker_hashrate
|
||||
return self.sticker_hashrate.into(self.algo.unit.default)
|
||||
try:
|
||||
rate_unit = rpc_stats["STATS"][1]["rate_unit"]
|
||||
except KeyError:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.68.2"
|
||||
version = "0.68.4"
|
||||
description = "A simplified and standardized interface for Bitcoin ASICs."
|
||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||
repository = "https://github.com/UpstreamData/pyasic"
|
||||
|
||||
@@ -6,6 +6,7 @@ from unittest.mock import patch
|
||||
|
||||
from pyasic import APIError, MinerData
|
||||
from pyasic.data import Fan, HashBoard
|
||||
from pyasic.device.algorithm.hashrate.unit.scrypt import ScryptUnit
|
||||
from pyasic.miners.hammer import HammerD10
|
||||
|
||||
POOLS = [
|
||||
@@ -398,6 +399,6 @@ class TestHammerMiners(unittest.IsolatedAsyncioTestCase):
|
||||
self.assertEqual(result.api_ver, "3.1")
|
||||
self.assertEqual(result.fw_ver, "2023-05-28 17-20-35 CST")
|
||||
self.assertEqual(result.hostname, "Hammer")
|
||||
self.assertEqual(round(result.hashrate), 4686)
|
||||
self.assertEqual(round(result.hashrate.into(ScryptUnit.MH)), 4686)
|
||||
self.assertEqual(result.fans, [Fan(speed=4650), Fan(speed=4500)])
|
||||
self.assertEqual(result.total_chips, result.expected_chips)
|
||||
|
||||
Reference in New Issue
Block a user