From fd0e02af591a8a27db2977c82cd741f64ef9c4dc Mon Sep 17 00:00:00 2001 From: Brett Rowan <121075405+b-rowan@users.noreply.github.com> Date: Thu, 12 Sep 2024 17:19:08 -0600 Subject: [PATCH] feature: add support for BOSMinerT21 --- pyasic/miners/antminer/bosminer/X21/T21.py | 22 +++++++++++++++++++ .../miners/antminer/bosminer/X21/__init__.py | 1 + pyasic/miners/factory.py | 1 + 3 files changed, 24 insertions(+) create mode 100644 pyasic/miners/antminer/bosminer/X21/T21.py diff --git a/pyasic/miners/antminer/bosminer/X21/T21.py b/pyasic/miners/antminer/bosminer/X21/T21.py new file mode 100644 index 00000000..7b3c5a66 --- /dev/null +++ b/pyasic/miners/antminer/bosminer/X21/T21.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.device.models import T21 + + +class BOSMinerT21(BOSer, T21): + pass diff --git a/pyasic/miners/antminer/bosminer/X21/__init__.py b/pyasic/miners/antminer/bosminer/X21/__init__.py index c98eb7b3..903bdb1a 100644 --- a/pyasic/miners/antminer/bosminer/X21/__init__.py +++ b/pyasic/miners/antminer/bosminer/X21/__init__.py @@ -15,3 +15,4 @@ # ------------------------------------------------------------------------------ from .S21 import BOSMinerS21 +from .T21 import BOSMinerT21 diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 6a87de4e..d8c863a1 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -376,6 +376,7 @@ MINER_CLASSES = { "ANTMINER S19 PRO+ HYD.": BOSMinerS19ProPlusHydro, "ANTMINER T19": BOSMinerT19, "ANTMINER S21": BOSMinerS21, + "ANTMINER T21": BOSMinerT21, }, MinerTypes.VNISH: { None: VNish,