Skip to content

Commit 2437421

Browse files
committed
feature: add support for a bunch of BOS and VNish S21 models.
1 parent 40ebc27 commit 2437421

File tree

7 files changed

+165
-4
lines changed

7 files changed

+165
-4
lines changed

docs/miners/antminer/X21.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,19 @@
9292
show_root_heading: false
9393
heading_level: 0
9494

95+
## S21 Hydro (BOS+)
96+
97+
- [x] Shutdowns
98+
- [ ] Power Modes
99+
- [x] Setpoints
100+
- [ ] Presets
101+
102+
::: pyasic.miners.antminer.bosminer.X21.S21.BOSMinerS21Hydro
103+
handler: python
104+
options:
105+
show_root_heading: false
106+
heading_level: 0
107+
95108
## S21 Pro (BOS+)
96109

97110
- [x] Shutdowns
@@ -105,6 +118,32 @@
105118
show_root_heading: false
106119
heading_level: 0
107120

121+
## S21+ (BOS+)
122+
123+
- [x] Shutdowns
124+
- [ ] Power Modes
125+
- [x] Setpoints
126+
- [ ] Presets
127+
128+
::: pyasic.miners.antminer.bosminer.X21.S21.BOSMinerS21Plus
129+
handler: python
130+
options:
131+
show_root_heading: false
132+
heading_level: 0
133+
134+
## S21+ Hydro (BOS+)
135+
136+
- [x] Shutdowns
137+
- [ ] Power Modes
138+
- [x] Setpoints
139+
- [ ] Presets
140+
141+
::: pyasic.miners.antminer.bosminer.X21.S21.BOSMinerS21PlusHydro
142+
handler: python
143+
options:
144+
show_root_heading: false
145+
heading_level: 0
146+
108147
## T21 (BOS+)
109148

110149
- [x] Shutdowns
@@ -131,6 +170,58 @@
131170
show_root_heading: false
132171
heading_level: 0
133172

173+
## S21 Hydro (VNish)
174+
175+
- [x] Shutdowns
176+
- [ ] Power Modes
177+
- [x] Setpoints
178+
- [x] Presets
179+
180+
::: pyasic.miners.antminer.vnish.X21.S21.VNishS21Hydro
181+
handler: python
182+
options:
183+
show_root_heading: false
184+
heading_level: 0
185+
186+
## S21 Pro (VNish)
187+
188+
- [x] Shutdowns
189+
- [ ] Power Modes
190+
- [x] Setpoints
191+
- [x] Presets
192+
193+
::: pyasic.miners.antminer.vnish.X21.S21.VNishS21Pro
194+
handler: python
195+
options:
196+
show_root_heading: false
197+
heading_level: 0
198+
199+
## S21+ (VNish)
200+
201+
- [x] Shutdowns
202+
- [ ] Power Modes
203+
- [x] Setpoints
204+
- [x] Presets
205+
206+
::: pyasic.miners.antminer.vnish.X21.S21.VNishS21Plus
207+
handler: python
208+
options:
209+
show_root_heading: false
210+
heading_level: 0
211+
212+
## S21+ Hydro (VNish)
213+
214+
- [x] Shutdowns
215+
- [ ] Power Modes
216+
- [x] Setpoints
217+
- [x] Presets
218+
219+
::: pyasic.miners.antminer.vnish.X21.S21.VNishS21PlusHydro
220+
handler: python
221+
options:
222+
show_root_heading: false
223+
heading_level: 0
224+
134225
## T21 (VNish)
135226

136227
- [x] Shutdowns

docs/miners/supported_types.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,9 @@ details {
663663
<ul>
664664
<li><a href="../antminer/X21#s21-bos_1">S21 (BOS+)</a></li>
665665
<li><a href="../antminer/X21#s21-pro-bos_1">S21 Pro (BOS+)</a></li>
666+
<li><a href="../antminer/X21#s21_1-bos_1">S21+ (BOS+)</a></li>
667+
<li><a href="../antminer/X21#s21_1-hydro-bos_1">S21+ Hydro (BOS+)</a></li>
668+
<li><a href="../antminer/X21#s21-hydro-bos_1">S21 Hydro (BOS+)</a></li>
666669
<li><a href="../antminer/X21#t21-bos_1">T21 (BOS+)</a></li>
667670
</ul>
668671
</details>
@@ -721,6 +724,10 @@ details {
721724
<ul>
722725
<li><a href="../antminer/X21#t21-vnish">T21 (VNish)</a></li>
723726
<li><a href="../antminer/X21#s21-vnish">S21 (VNish)</a></li>
727+
<li><a href="../antminer/X21#s21_1-vnish">S21+ (VNish)</a></li>
728+
<li><a href="../antminer/X21#s21_1-hydro-vnish">S21+ Hydro (VNish)</a></li>
729+
<li><a href="../antminer/X21#s21-pro-vnish">S21 Pro (VNish)</a></li>
730+
<li><a href="../antminer/X21#s21-hydro-vnish">S21 Hydro (VNish)</a></li>
724731
</ul>
725732
</details>
726733
</ul>

pyasic/miners/antminer/bosminer/X21/S21.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,40 @@
1515
# ------------------------------------------------------------------------------
1616

1717
from pyasic.miners.backends import BOSer
18-
from pyasic.miners.device.models import S21, S21Pro
18+
from pyasic.miners.device.models import S21, S21Hydro, S21Plus, S21PlusHydro, S21Pro
19+
20+
# ------------------------------------------------------------------------------
21+
# Copyright 2022 Upstream Data Inc -
22+
# -
23+
# Licensed under the Apache License, Version 2.0 (the "License"); -
24+
# you may not use this file except in compliance with the License. -
25+
# You may obtain a copy of the License at -
26+
# -
27+
# http://www.apache.org/licenses/LICENSE-2.0 -
28+
# -
29+
# Unless required by applicable law or agreed to in writing, software -
30+
# distributed under the License is distributed on an "AS IS" BASIS, -
31+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -
32+
# See the License for the specific language governing permissions and -
33+
# limitations under the License. -
34+
# ------------------------------------------------------------------------------
1935

2036

2137
class BOSMinerS21(BOSer, S21):
2238
pass
2339

2440

41+
class BOSMinerS21Plus(BOSer, S21Plus):
42+
pass
43+
44+
45+
class BOSMinerS21PlusHydro(BOSer, S21PlusHydro):
46+
pass
47+
48+
2549
class BOSMinerS21Pro(BOSer, S21Pro):
2650
pass
51+
52+
53+
class BOSMinerS21Hydro(BOSer, S21Hydro):
54+
pass

pyasic/miners/antminer/bosminer/X21/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
# limitations under the License. -
1515
# ------------------------------------------------------------------------------
1616

17-
from .S21 import BOSMinerS21, BOSMinerS21Pro
17+
from .S21 import (
18+
BOSMinerS21,
19+
BOSMinerS21Hydro,
20+
BOSMinerS21Plus,
21+
BOSMinerS21PlusHydro,
22+
BOSMinerS21Pro,
23+
)
1824
from .T21 import BOSMinerT21

pyasic/miners/antminer/vnish/X21/S21.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,24 @@
1515
# ------------------------------------------------------------------------------
1616

1717
from pyasic.miners.backends import VNish
18-
from pyasic.miners.device.models import S21
18+
from pyasic.miners.device.models import S21, S21Hydro, S21Plus, S21PlusHydro, S21Pro
1919

2020

2121
class VNishS21(VNish, S21):
2222
pass
23+
24+
25+
class VNishS21Plus(VNish, S21Plus):
26+
pass
27+
28+
29+
class VNishS21PlusHydro(VNish, S21PlusHydro):
30+
pass
31+
32+
33+
class VNishS21Pro(VNish, S21Pro):
34+
pass
35+
36+
37+
class VNishS21Hydro(VNish, S21Hydro):
38+
pass

pyasic/miners/antminer/vnish/X21/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
# limitations under the License. -
1515
# ------------------------------------------------------------------------------
1616

17-
from .S21 import VNishS21
17+
from .S21 import (
18+
VNishS21,
19+
VNishS21Hydro,
20+
VNishS21Plus,
21+
VNishS21PlusHydro,
22+
VNishS21Pro,
23+
)
1824
from .T21 import VNishT21

pyasic/miners/factory.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ class MinerTypes(enum.Enum):
555555
"ANTMINER T19": BOSMinerT19,
556556
"ANTMINER S21": BOSMinerS21,
557557
"ANTMINER S21 PRO": BOSMinerS21Pro,
558+
"ANTMINER S21+": BOSMinerS21Plus,
559+
"ANTMINER S21+ HYD.": BOSMinerS21PlusHydro,
560+
"ANTMINER S21 HYD.": BOSMinerS21Hydro,
558561
"ANTMINER T21": BOSMinerT21,
559562
"BRAIINS MINI MINER BMM 100": BraiinsBMM100,
560563
"BRAIINS MINI MINER BMM 101": BraiinsBMM101,
@@ -581,6 +584,10 @@ class MinerTypes(enum.Enum):
581584
"ANTMINER T19": VNishT19,
582585
"ANTMINER T21": VNishT21,
583586
"ANTMINER S21": VNishS21,
587+
"ANTMINER S21+": VNishS21Plus,
588+
"ANTMINER S21+ HYD.": VNishS21PlusHydro,
589+
"ANTMINER S21 PRO": VNishS21Pro,
590+
"ANTMINER S21 HYD.": VNishS21Hydro,
584591
},
585592
MinerTypes.EPIC: {
586593
None: ePIC,

0 commit comments

Comments
 (0)