feature: add whatsminer M31SV10 and V60.

This commit is contained in:
UpstreamData
2022-12-02 15:51:27 -07:00
parent 2adbce3c21
commit abd4d18a01
7 changed files with 53 additions and 4 deletions

View File

@@ -90,6 +90,8 @@ details {
</details> </details>
<details> <details>
<summary><a href="../whatsminer/M3X/#m31s">M31S</a></summary> <summary><a href="../whatsminer/M3X/#m31s">M31S</a></summary>
<summary><a href="../whatsminer/M3X/#m31sv10">M31SV10</a></summary>
<summary><a href="../whatsminer/M3X/#m31sv60">M31SV60</a></summary>
<summary><a href="../whatsminer/M3X/#m31sv70">M31SV70</a></summary> <summary><a href="../whatsminer/M3X/#m31sv70">M31SV70</a></summary>
</details> </details>
<details> <details>

View File

@@ -114,9 +114,25 @@
show_root_heading: false show_root_heading: false
heading_level: 4 heading_level: 4
## M31SV10
::: pyasic.miners.whatsminer.btminer.M3X.M31S.BTMinerM31SV10
handler: python
options:
show_root_heading: false
heading_level: 4
## M31SV60
::: pyasic.miners.whatsminer.btminer.M3X.M31S.BTMinerM31SV60
handler: python
options:
show_root_heading: false
heading_level: 4
## M31SV70 ## M31SV70
::: pyasic.miners.whatsminer.btminer.M3X.M31S.BTMinerM31S ::: pyasic.miners.whatsminer.btminer.M3X.M31S.BTMinerM31SV70
handler: python handler: python
options: options:
show_root_heading: false show_root_heading: false

View File

@@ -24,6 +24,23 @@ class M31S(BaseMiner): # noqa - ignore ABC method implementation
self.fan_count = 2 self.fan_count = 2
class M31SV10(BaseMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str):
super().__init__()
self.ip = ip
self.model = "M31S V10"
self.nominal_chips = 105
self.fan_count = 2
class M31SV60(BaseMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str):
super().__init__()
self.ip = ip
self.model = "M31S V60"
self.nominal_chips = 105
self.fan_count = 2
class M31SV70(BaseMiner): # noqa - ignore ABC method implementation class M31SV70(BaseMiner): # noqa - ignore ABC method implementation
def __init__(self, ip: str): def __init__(self, ip: str):
super().__init__() super().__init__()

View File

@@ -20,7 +20,7 @@ from .M30S_Plus_Plus import (
M30SPlusPlusVG40, M30SPlusPlusVG40,
M30SPlusPlusVH60, M30SPlusPlusVH60,
) )
from .M31S import M31S, M31SV70 from .M31S import M31S, M31SV10, M31SV60, M31SV70
from .M31S_Plus import ( from .M31S_Plus import (
M31SPlus, M31SPlus,
M31SPlusV30, M31SPlusV30,

View File

@@ -195,6 +195,8 @@ MINER_CLASSES = {
"M31S": { "M31S": {
"Default": BTMinerM31S, "Default": BTMinerM31S,
"BTMiner": BTMinerM31S, "BTMiner": BTMinerM31S,
"V10": BTMinerM31SV10,
"V60": BTMinerM31SV60,
"V70": BTMinerM31SV70, "V70": BTMinerM31SV70,
}, },
"M31S+": { "M31S+": {

View File

@@ -13,7 +13,7 @@
# limitations under the License. # limitations under the License.
from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module
from pyasic.miners._types import M31S, M31SV70 # noqa - Ignore access to _module from pyasic.miners._types import M31S, M31SV10, M31SV60, M31SV70 # noqa - Ignore access to _module
class BTMinerM31S(BTMiner, M31S): class BTMinerM31S(BTMiner, M31S):
@@ -22,6 +22,18 @@ class BTMinerM31S(BTMiner, M31S):
self.ip = ip self.ip = ip
class BTMinerM31SV10(BTMiner, M31SV10):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip
class BTMinerM31SV60(BTMiner, M31SV60):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip
class BTMinerM31SV70(BTMiner, M31SV70): class BTMinerM31SV70(BTMiner, M31SV70):
def __init__(self, ip: str) -> None: def __init__(self, ip: str) -> None:
super().__init__(ip) super().__init__(ip)

View File

@@ -31,7 +31,7 @@ from .M30S_Plus_Plus import (
BTMinerM30SPlusPlusVG40, BTMinerM30SPlusPlusVG40,
BTMinerM30SPlusPlusVH60, BTMinerM30SPlusPlusVH60,
) )
from .M31S import BTMinerM31S, BTMinerM31SV70 from .M31S import BTMinerM31S, BTMinerM31SV10, BTMinerM31SV60, BTMinerM31SV70
from .M31S_Plus import ( from .M31S_Plus import (
BTMinerM31SPlus, BTMinerM31SPlus,
BTMinerM31SPlusV30, BTMinerM31SPlusV30,