tracks boards by left/center/right now in lieu of board numbers, and works with Hive T9s and BOS S9s and X17s
This commit is contained in:
@@ -15,7 +15,7 @@ class HiveonT9(BMMiner):
|
||||
board_stats = await self.api.stats()
|
||||
stats = board_stats['STATS'][1]
|
||||
boards = {}
|
||||
board_chains = {6: [2, 9, 10], 7: [3, 11, 12], 8: [4, 13, 14]}
|
||||
board_chains = {0: [2, 9, 10], 1: [3, 11, 12], 2: [4, 13, 14]}
|
||||
for idx, board in enumerate(board_chains):
|
||||
boards[board] = []
|
||||
for chain in board_chains[board]:
|
||||
|
||||
@@ -5,6 +5,7 @@ class BOSMinerX17(BOSMiner):
|
||||
def __init__(self, ip: str) -> None:
|
||||
super().__init__(ip)
|
||||
self.api_type = "BOSMiner"
|
||||
self.nominal_chips = 65
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"BOSminerX17: {str(self.ip)}"
|
||||
|
||||
@@ -13,6 +13,7 @@ class BOSMiner(BaseMiner):
|
||||
self.config = None
|
||||
self.uname = 'root'
|
||||
self.pwd = 'admin'
|
||||
self.nominal_chips = 63
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"BOSminer: {str(self.ip)}"
|
||||
@@ -117,14 +118,15 @@ class BOSMiner(BaseMiner):
|
||||
return {6: [], 7: [], 8: []}
|
||||
devs = devdetails['DEVDETAILS']
|
||||
boards = {}
|
||||
offset = devs[0]["ID"]
|
||||
for board in devs:
|
||||
boards[board["ID"]] = []
|
||||
if not board['Chips'] == 63:
|
||||
boards[board["ID"] - offset] = []
|
||||
if not board['Chips'] == self.nominal_chips:
|
||||
nominal = False
|
||||
else:
|
||||
nominal = True
|
||||
boards[board["ID"]].append({
|
||||
"chain": board["ID"],
|
||||
boards[board["ID"] - offset].append({
|
||||
"chain": board["ID"] - offset,
|
||||
"chip_count": board['Chips'],
|
||||
"chip_status": "o" * board['Chips'],
|
||||
"nominal": nominal
|
||||
|
||||
Reference in New Issue
Block a user