bug: fix some issues with S19j88NoPic on braiinsOS.

This commit is contained in:
UpstreamData
2023-05-29 11:39:43 -06:00
parent f816551d7a
commit eabae92da6
7 changed files with 33 additions and 8 deletions

View File

@@ -24,3 +24,12 @@ class S19j(AntMiner): # noqa - ignore ABC method implementation
self.model = "S19j"
self.nominal_chips = 114
self.fan_count = 4
class S19jNoPIC(AntMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str, api_ver: str = "0.0.0"):
super().__init__(ip, api_ver)
self.ip = ip
self.model = "S19j No PIC"
self.nominal_chips = 88
self.fan_count = 4

View File

@@ -19,7 +19,7 @@ from .S19_Pro import S19Pro
from .S19_XP import S19XP
from .S19a import S19a
from .S19a_Pro import S19aPro
from .S19j import S19j
from .S19j import S19j, S19jNoPIC
from .S19j_Pro import S19jPro
from .S19L import S19L
from .T19 import T19

View File

@@ -15,10 +15,14 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import AntminerModern
from pyasic.miners.btc._types import S19j # noqa - Ignore access to _module
from pyasic.miners.btc._types import S19j, S19jNoPIC # noqa - Ignore access to _module
# noqa - Ignore access to _module
class BMMinerS19j(AntminerModern, S19j):
pass
class BMMinerS19jNoPIC(AntminerModern, S19jNoPIC):
pass

View File

@@ -19,7 +19,7 @@ from .S19_Pro import BMMinerS19Pro
from .S19_XP import BMMinerS19XP
from .S19a import BMMinerS19a
from .S19a_Pro import BMMinerS19aPro
from .S19j import BMMinerS19j
from .S19j import BMMinerS19j, BMMinerS19jNoPIC
from .S19j_Pro import BMMinerS19jPro
from .S19L import BMMinerS19L
from .T19 import BMMinerT19

View File

@@ -15,8 +15,12 @@
# ------------------------------------------------------------------------------
from pyasic.miners.backends import BOSMiner
from pyasic.miners.btc._types import S19j # noqa - Ignore access to _module
from pyasic.miners.btc._types import S19j, S19jNoPIC # noqa - Ignore access to _module
class BOSMinerS19j(BOSMiner, S19j):
pass
class BOSMinerS19jNoPIC(BOSMiner, S19jNoPIC):
pass

View File

@@ -16,6 +16,6 @@
from .S19 import BOSMinerS19
from .S19_Pro import BOSMinerS19Pro
from .S19j import BOSMinerS19j
from .S19j import BOSMinerS19j, BOSMinerS19jNoPIC
from .S19j_Pro import BOSMinerS19jPro
from .T19 import BOSMinerT19

View File

@@ -163,6 +163,11 @@ MINER_CLASSES = {
"CGMiner": CGMinerS19j,
"VNish": VNishS19j,
},
"ANTMINER S19J NOPIC": {
"Default": BMMinerS19jNoPIC,
"BOSMiner+": BOSMinerS19jNoPIC,
"BMMiner": BMMinerS19jNoPIC,
},
"ANTMINER S19J PRO": {
"Default": BMMinerS19jPro,
"BOSMiner+": BOSMinerS19jPro,
@@ -752,9 +757,12 @@ class MinerFactory(metaclass=Singleton):
try:
if devdetails.get("DEVDETAILS"):
model = devdetails["DEVDETAILS"][0][_devdetails_key].upper()
if " NOPIC" in model:
# Braiins OS identifies some X19 differently
model = model.replace(" NOPIC", "")
if "NOPIC" in model:
# bos, weird model
if model == "ANTMINER S19J88NOPIC":
model = "ANTMINER S19J NOPIC"
else:
print(model)
if not model == "BITMICRO":
break
elif devdetails.get("DEVS"):