From 1ff20fc6f07713228b29dd88d450c4c2b0609699 Mon Sep 17 00:00:00 2001 From: Upstream Data Date: Mon, 8 Apr 2024 12:15:12 -0600 Subject: [PATCH] feature: add bosminer S21 support. --- docs/miners/antminer/X19.md | 2 +- docs/miners/antminer/X21.md | 7 ++++++ docs/miners/supported_types.md | 8 ++++++- pyasic/miners/antminer/bosminer/X21/S21.py | 22 +++++++++++++++++++ .../miners/antminer/bosminer/X21/__init__.py | 17 ++++++++++++++ pyasic/miners/antminer/bosminer/__init__.py | 1 + pyasic/miners/factory.py | 1 + 7 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 pyasic/miners/antminer/bosminer/X21/S21.py create mode 100644 pyasic/miners/antminer/bosminer/X21/__init__.py diff --git a/docs/miners/antminer/X19.md b/docs/miners/antminer/X19.md index 32640fec..231a7197 100644 --- a/docs/miners/antminer/X19.md +++ b/docs/miners/antminer/X19.md @@ -106,7 +106,7 @@ show_root_heading: false heading_level: 4 -## S19 Pro+ Hydro +## S19K Pro ::: pyasic.miners.antminer.bmminer.X19.S19.BMMinerS19KPro handler: python options: diff --git a/docs/miners/antminer/X21.md b/docs/miners/antminer/X21.md index 5801b2a1..e777a765 100644 --- a/docs/miners/antminer/X21.md +++ b/docs/miners/antminer/X21.md @@ -8,6 +8,13 @@ show_root_heading: false heading_level: 4 +## S21 +::: pyasic.miners.antminer.bosminer.X21.S21.BOSMinerS21 + handler: python + options: + show_root_heading: false + heading_level: 4 + ## S21 (ePIC) ::: pyasic.miners.antminer.epic.X21.S21.ePICS21 handler: python diff --git a/docs/miners/supported_types.md b/docs/miners/supported_types.md index bde6e663..bedf9163 100644 --- a/docs/miners/supported_types.md +++ b/docs/miners/supported_types.md @@ -81,7 +81,7 @@ details {
  • S19 Hydro
  • S19 Pro Hydro
  • S19 Pro+ Hydro
  • -
  • S19 Pro+ Hydro
  • +
  • S19K Pro
  • T19
  • @@ -460,6 +460,12 @@ details {
  • T19
  • +
    + X21 Series: + +
    diff --git a/pyasic/miners/antminer/bosminer/X21/S21.py b/pyasic/miners/antminer/bosminer/X21/S21.py new file mode 100644 index 00000000..4ea9d620 --- /dev/null +++ b/pyasic/miners/antminer/bosminer/X21/S21.py @@ -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 BOSer +from pyasic.miners.models import S21 + + +class BOSMinerS21(BOSer, S21): + pass diff --git a/pyasic/miners/antminer/bosminer/X21/__init__.py b/pyasic/miners/antminer/bosminer/X21/__init__.py new file mode 100644 index 00000000..c98eb7b3 --- /dev/null +++ b/pyasic/miners/antminer/bosminer/X21/__init__.py @@ -0,0 +1,17 @@ +# ------------------------------------------------------------------------------ +# 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 .S21 import BOSMinerS21 diff --git a/pyasic/miners/antminer/bosminer/__init__.py b/pyasic/miners/antminer/bosminer/__init__.py index 2d43e0e4..3a4ad3bd 100644 --- a/pyasic/miners/antminer/bosminer/__init__.py +++ b/pyasic/miners/antminer/bosminer/__init__.py @@ -17,3 +17,4 @@ from .X9 import * from .X17 import * from .X19 import * +from .X21 import * diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 81513c8e..50e74966 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -374,6 +374,7 @@ MINER_CLASSES = { "ANTMINER S19K PRO NOPIC": BOSMinerS19kProNoPIC, "ANTMINER S19 XP": BOSMinerS19XP, "ANTMINER T19": BOSMinerT19, + "ANTMINER S21": BOSMinerS21, }, MinerTypes.VNISH: { None: VNish,