feature: add support for M50S++ models.

This commit is contained in:
Upstream Data
2023-05-25 21:08:47 -06:00
parent 74c13806fb
commit 4e3ea4eabb
5 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
# ------------------------------------------------------------------------------
# Copyright 2022 Upstream Data Inc -
# -
# Licensed under the Apache License, Version 2.0 (the "License"); -
# you may not use this file except in compliance with the License. -
# You may obtain a copy of the License at -
# -
# http://www.apache.org/licenses/LICENSE-2.0 -
# -
# Unless required by applicable law or agreed to in writing, software -
# distributed under the License is distributed on an "AS IS" BASIS, -
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
import warnings
from pyasic.miners.makes import WhatsMiner
class M50SPlusPlusVK10(WhatsMiner): # 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 = "M50S++ VK10"
self.nominal_chips = 0
warnings.warn(
"Unknown chip count for miner type M50S+ VK10, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.fan_count = 2
class M50SPlusPlusVK20(WhatsMiner): # 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 = "M50S++ VK20"
self.nominal_chips = 0
warnings.warn(
"Unknown chip count for miner type M50S+ VK20, please open an issue on GitHub (https://github.com/UpstreamData/pyasic)."
)
self.fan_count = 2
class M50SPlusPlusVK30(WhatsMiner): # 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 = "M50S++ VK30"
self.nominal_chips = 76
self.fan_count = 2

View File

@@ -39,6 +39,7 @@ from .M50S import (
M50SVJ30,
)
from .M50S_Plus import M50SPlusVH30, M50SPlusVH40, M50SPlusVJ30
from .M50S_Plus_Plus import M50SPlusPlusVK30, M50SPlusPlusVK20, M50SPlusPlusVK10
from .M53 import M53VH30
from .M53S import M53SVH30
from .M53S_Plus import M53SPlusVJ30

View File

@@ -0,0 +1,39 @@
# ------------------------------------------------------------------------------
# Copyright 2022 Upstream Data Inc -
# -
# Licensed under the Apache License, Version 2.0 (the "License"); -
# you may not use this file except in compliance with the License. -
# You may obtain a copy of the License at -
# -
# http://www.apache.org/licenses/LICENSE-2.0 -
# -
# Unless required by applicable law or agreed to in writing, software -
# distributed under the License is distributed on an "AS IS" BASIS, -
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
# See the License for the specific language governing permissions and -
# limitations under the License. -
# ------------------------------------------------------------------------------
from pyasic.miners.backends import M5X
from pyasic.miners.btc._types.whatsminer.M5X.M50S_Plus_Plus import ( # noqa - ignore _module import
M50SPlusPlusVK10,
M50SPlusPlusVK20,
M50SPlusPlusVK30,
)
class BTMinerM50SPlusPlusVK10( # noqa - ignore ABC method implementation
M50SPlusPlusVK10, M5X
):
pass
class BTMinerM50SPlusPlusVK20( # noqa - ignore ABC method implementation
M50SPlusPlusVK20, M5X
):
pass
class BTMinerM50SPlusPlusVK30( # noqa - ignore ABC method implementation
M50SPlusPlusVK30, M5X
):
pass

View File

@@ -39,6 +39,7 @@ from .M50S import (
BTMinerM50SVJ30,
)
from .M50S_Plus import BTMinerM50SPlusVH30, BTMinerM50SPlusVH40, BTMinerM50SPlusVJ30
from .M50S_Plus_Plus import BTMinerM50SPlusPlusVK20, BTMinerM50SPlusPlusVK30, BTMinerM50SPlusPlusVK10
from .M53 import BTMinerM53VH30
from .M53S import BTMinerM53SVH30
from .M53S_Plus import BTMinerM53SPlusVJ30

View File

@@ -485,6 +485,13 @@ MINER_CLASSES = {
"H40": BTMinerM50SPlusVH40,
"J30": BTMinerM50SPlusVJ30,
},
"M50S+": {
"Default": BTMinerM50SPlusPlusVK10,
"BTMiner": BTMinerM50SPlusPlusVK10,
"K10": BTMinerM50SPlusPlusVK10,
"K20": BTMinerM50SPlusPlusVK20,
"K30": BTMinerM50SPlusPlusVK30,
},
"M53": {
"Default": BTMinerM53VH30,
"BTMiner": BTMinerM53VH30,