added new miner type M30S+VF20

This commit is contained in:
UpstreamData
2022-06-06 09:17:42 -06:00
parent c903631742
commit dce25a679f
5 changed files with 26 additions and 11 deletions

View File

@@ -99,5 +99,5 @@ class BaseMiner:
async def get_mac(self):
return None
async def get_data(self):
async def get_data(self) -> MinerData:
return MinerData(ip=str(self.ip))

View File

@@ -17,3 +17,12 @@ class M30SPlusVE40(BaseMiner):
self.model = "M30S+ VE40"
self.nominal_chips = 156
self.fan_count = 2
class M30SPlusVF20(BaseMiner):
def __init__(self, ip: str):
super().__init__()
self.ip = ip
self.model = "M30S+ VF20"
self.nominal_chips = 111
self.fan_count = 2

View File

@@ -1,5 +1,5 @@
from .M30S import M30S, M30SV50
from .M30S_Plus import M30SPlus, M30SPlusVE40
from .M30S_Plus import M30SPlus, M30SPlusVE40, M30SPlusVF20
from .M30S_Plus_Plus import M30SPlusPlusVG30, M30SPlusPlusVG40
from .M31S import M31S

View File

@@ -150,13 +150,13 @@ MINER_CLASSES = {
"M30S+": {
"Default": BTMinerM30SPlus,
"BTMiner": BTMinerM30SPlus,
"40": BTMinerM30SPlusVE40,
"E40": BTMinerM30SPlusVE40,
},
"M30S++": {
"Default": BTMinerM30SPlusPlusVG40,
"BTMiner": BTMinerM30SPlusPlusVG40,
"40": BTMinerM30SPlusPlusVG40,
"30": BTMinerM30SPlusPlusVG30,
"G40": BTMinerM30SPlusPlusVG40,
"G30": BTMinerM30SPlusPlusVG30,
},
"M31S": {
"Default": BTMinerM31S,
@@ -165,7 +165,7 @@ MINER_CLASSES = {
"M31S+": {
"Default": BTMinerM31SPlus,
"BTMiner": BTMinerM31SPlus,
"20": BTMinerM31SPlusVE20,
"E20": BTMinerM31SPlusVE20,
},
"M32S": {
"Default": BTMinerM32S,
@@ -438,10 +438,6 @@ class MinerFactory(metaclass=Singleton):
_ver = model.split("V")
if len(_ver) > 1:
ver = model.split("V")[1]
if "VE" in model:
ver = model.split("VE")[1]
if "VG" in model:
ver = model.split("VG")[1]
model = model.split("V")[0]
# don't need "Bitmain", just "Antminer XX" as model
if "Bitmain " in model:

View File

@@ -1,5 +1,9 @@
from miners._backends import BTMiner # noqa - Ignore access to _module
from miners._types import M30SPlus, M30SPlusVE40 # noqa - Ignore access to _module
from miners._types import (
M30SPlus,
M30SPlusVE40,
M30SPlusVF20,
) # noqa - Ignore access to _module
class BTMinerM30SPlus(BTMiner, M30SPlus):
@@ -12,3 +16,9 @@ class BTMinerM30SPlusVE40(BTMiner, M30SPlusVE40):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip
class BTMinerM30SPlusVF20(BTMiner, M30SPlusVF20):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip