feature: add support for S9j.

This commit is contained in:
UpstreamData
2023-05-16 16:08:49 -06:00
parent 706844264b
commit 0cead26872
5 changed files with 54 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
# ------------------------------------------------------------------------------
# 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.makes import AntMiner
class S9j(AntMiner): # 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 = "S9j"
self.nominal_chips = 63
self.fan_count = 2

View File

@@ -16,4 +16,5 @@
from .S9 import S9 from .S9 import S9
from .S9i import S9i from .S9i import S9i
from .S9j import S9j
from .T9 import T9 from .T9 import T9

View File

@@ -0,0 +1,22 @@
# ------------------------------------------------------------------------------
# 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 BMMiner
from pyasic.miners.btc._types import S9j # noqa - Ignore access to _module
class BMMinerS9j(BMMiner, S9j):
pass

View File

@@ -16,4 +16,5 @@
from .S9 import BMMinerS9 from .S9 import BMMinerS9
from .S9i import BMMinerS9i from .S9i import BMMinerS9i
from .S9j import BMMinerS9j
from .T9 import BMMinerT9 from .T9 import BMMinerT9

View File

@@ -83,6 +83,10 @@ MINER_CLASSES = {
"Default": BMMinerS9i, "Default": BMMinerS9i,
"BMMiner": BMMinerS9i, "BMMiner": BMMinerS9i,
}, },
"ANTMINER S9J": {
"Default": BMMinerS9j,
"BMMiner": BMMinerS9j,
},
"ANTMINER T9": { "ANTMINER T9": {
"Default": BMMinerT9, "Default": BMMinerT9,
"BMMiner": BMMinerT9, "BMMiner": BMMinerT9,