Added support for X19 models with BraiinsOS

This commit is contained in:
UpstreamData
2022-03-25 09:06:25 -06:00
parent c3b23313ba
commit e1383f2002
3 changed files with 15 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
from miners.bosminer import BOSMiner
class BOSMinerX19(BOSMiner):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.api_type = "BOSMiner"
self.nominal_chips = 114
def __repr__(self) -> str:
return f"BOSminerX19: {str(self.ip)}"

View File

@@ -12,6 +12,7 @@ from miners.antminer.X17.cgminer import CGMinerX17
from miners.antminer.X19.bmminer import BMMinerX19 from miners.antminer.X19.bmminer import BMMinerX19
from miners.antminer.X19.cgminer import CGMinerX19 from miners.antminer.X19.cgminer import CGMinerX19
from miners.antminer.X19.bosminer import BOSMinerX19
from miners.whatsminer.M20 import BTMinerM20 from miners.whatsminer.M20 import BTMinerM20
from miners.whatsminer.M21 import BTMinerM21 from miners.whatsminer.M21 import BTMinerM21
@@ -141,8 +142,9 @@ class MinerFactory:
# X19 logic # X19 logic
elif "19" in model: elif "19" in model:
# handle the different API types # handle the different API types
if "BOSMiner" in api:
miner = BOSMinerX19(str(ip))
if "CGMiner" in api: if "CGMiner" in api:
miner = CGMinerX19(str(ip)) miner = CGMinerX19(str(ip))
elif "BMMiner" in api: elif "BMMiner" in api:

View File

@@ -59,7 +59,7 @@ layout = [
max_col_width=15, max_col_width=15,
justification="center", justification="center",
key="ip_table", key="ip_table",
col_widths=[15, 13, 15, 15, 12, 31, 11], col_widths=[15, 16, 15, 12, 12, 31, 11],
background_color="white", background_color="white",
text_color="black", text_color="black",
size=(135, 27), size=(135, 27),