From c16367285fa156a8de8f5ed98fb7fa497a252859 Mon Sep 17 00:00:00 2001 From: Upstream Data Date: Tue, 10 Dec 2024 11:13:24 -0700 Subject: [PATCH] feature: add support for avalonminer 1126 Pro --- docs/miners/avalonminer/A11X.md | 7 +++++ docs/miners/supported_types.md | 1 + pyasic/device/models.py | 1 + .../miners/avalonminer/cgminer/A11X/A1126.py | 22 ++++++++++++++++ .../avalonminer/cgminer/A11X/__init__.py | 1 + .../device/models/avalonminer/A11X/A1126.py | 26 +++++++++++++++++++ .../models/avalonminer/A11X/__init__.py | 1 + pyasic/miners/factory.py | 1 + 8 files changed, 60 insertions(+) create mode 100644 pyasic/miners/avalonminer/cgminer/A11X/A1126.py create mode 100644 pyasic/miners/device/models/avalonminer/A11X/A1126.py diff --git a/docs/miners/avalonminer/A11X.md b/docs/miners/avalonminer/A11X.md index c51ebc87..ec6d868f 100644 --- a/docs/miners/avalonminer/A11X.md +++ b/docs/miners/avalonminer/A11X.md @@ -1,6 +1,13 @@ # pyasic ## A11X Models +## Avalon 1126 Pro (Stock) +::: pyasic.miners.avalonminer.cgminer.A11X.A1126.CGMinerAvalon1126Pro + handler: python + options: + show_root_heading: false + heading_level: 4 + ## Avalon 1166 Pro (Stock) ::: pyasic.miners.avalonminer.cgminer.A11X.A1166.CGMinerAvalon1166Pro handler: python diff --git a/docs/miners/supported_types.md b/docs/miners/supported_types.md index 27f20c37..e4f91046 100644 --- a/docs/miners/supported_types.md +++ b/docs/miners/supported_types.md @@ -378,6 +378,7 @@ details {
A11X Series:
diff --git a/pyasic/device/models.py b/pyasic/device/models.py index bbc50bb1..bcdb24b7 100644 --- a/pyasic/device/models.py +++ b/pyasic/device/models.py @@ -296,6 +296,7 @@ class AvalonminerModels(MinerModelType): Avalon1047 = "Avalon 1047" Avalon1066 = "Avalon 1066" Avalon1166Pro = "Avalon 1166 Pro" + Avalon1126Pro = "Avalon 1126 Pro" Avalon1246 = "Avalon 1246" AvalonNano3 = "Avalon Nano 3" diff --git a/pyasic/miners/avalonminer/cgminer/A11X/A1126.py b/pyasic/miners/avalonminer/cgminer/A11X/A1126.py new file mode 100644 index 00000000..4b9ab581 --- /dev/null +++ b/pyasic/miners/avalonminer/cgminer/A11X/A1126.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 AvalonMiner +from pyasic.miners.device.models import Avalon1126Pro + + +class CGMinerAvalon1126Pro(AvalonMiner, Avalon1126Pro): + pass diff --git a/pyasic/miners/avalonminer/cgminer/A11X/__init__.py b/pyasic/miners/avalonminer/cgminer/A11X/__init__.py index 391aa0a7..1eab02ee 100644 --- a/pyasic/miners/avalonminer/cgminer/A11X/__init__.py +++ b/pyasic/miners/avalonminer/cgminer/A11X/__init__.py @@ -14,4 +14,5 @@ # limitations under the License. - # ------------------------------------------------------------------------------ +from .A1126 import CGMinerAvalon1126Pro from .A1166 import CGMinerAvalon1166Pro diff --git a/pyasic/miners/device/models/avalonminer/A11X/A1126.py b/pyasic/miners/device/models/avalonminer/A11X/A1126.py new file mode 100644 index 00000000..f1ee12c2 --- /dev/null +++ b/pyasic/miners/device/models/avalonminer/A11X/A1126.py @@ -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.device.algorithm import MinerAlgo +from pyasic.device.models import MinerModel +from pyasic.miners.device.makes import AvalonMinerMake + + +class Avalon1126Pro(AvalonMinerMake): + raw_model = MinerModel.AVALONMINER.Avalon1126Pro + + expected_fans = 4 + expected_hashboards = 3 + algo = MinerAlgo.SHA256 diff --git a/pyasic/miners/device/models/avalonminer/A11X/__init__.py b/pyasic/miners/device/models/avalonminer/A11X/__init__.py index 897a199d..90bbc95f 100644 --- a/pyasic/miners/device/models/avalonminer/A11X/__init__.py +++ b/pyasic/miners/device/models/avalonminer/A11X/__init__.py @@ -15,4 +15,5 @@ # ------------------------------------------------------------------------------ +from .A1126 import Avalon1126Pro from .A1166 import Avalon1166Pro diff --git a/pyasic/miners/factory.py b/pyasic/miners/factory.py index 64acb02f..c7707414 100644 --- a/pyasic/miners/factory.py +++ b/pyasic/miners/factory.py @@ -340,6 +340,7 @@ class MinerTypes(enum.Enum): "AVALONMINER 1026": CGMinerAvalon1026, "AVALONMINER 1047": CGMinerAvalon1047, "AVALONMINER 1066": CGMinerAvalon1066, + "AVALONMINER 1126PRO": CGMinerAvalon1126Pro, "AVALONMINER 1166PRO": CGMinerAvalon1166Pro, "AVALONMINER 1246": CGMinerAvalon1246, "AVALONMINER NANO3": CGMinerAvalonNano3,