Skip to content

Commit

Permalink
feature: add support for avalonminer 1126 Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Dec 10, 2024
1 parent 17eae25 commit c163672
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/miners/avalonminer/A11X.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/miners/supported_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ details {
<details>
<summary>A11X Series:</summary>
<ul>
<li><a href="../avalonminer/A11X#avalon-1126-pro-stock">Avalon 1126 Pro (Stock)</a></li>
<li><a href="../avalonminer/A11X#avalon-1166-pro-stock">Avalon 1166 Pro (Stock)</a></li>
</ul>
</details>
Expand Down
1 change: 1 addition & 0 deletions pyasic/device/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
22 changes: 22 additions & 0 deletions pyasic/miners/avalonminer/cgminer/A11X/A1126.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions pyasic/miners/avalonminer/cgminer/A11X/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
# limitations under the License. -
# ------------------------------------------------------------------------------

from .A1126 import CGMinerAvalon1126Pro
from .A1166 import CGMinerAvalon1166Pro
26 changes: 26 additions & 0 deletions pyasic/miners/device/models/avalonminer/A11X/A1126.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions pyasic/miners/device/models/avalonminer/A11X/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
# ------------------------------------------------------------------------------


from .A1126 import Avalon1126Pro
from .A1166 import Avalon1166Pro
1 change: 1 addition & 0 deletions pyasic/miners/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c163672

Please sign in to comment.