feature: add the rest of the iceriver models

This commit is contained in:
Upstream Data
2024-10-30 09:27:12 -06:00
parent 7c18c9f69c
commit 0d90b60eef
10 changed files with 93 additions and 3 deletions

View File

@@ -345,7 +345,11 @@ class BitAxeModels(str, Enum):
class IceRiverModels(str, Enum):
KS0 = "KS0"
KS1 = "KS1"
KS2 = "KS2"
KS3 = "KS3"
KS3L = "KS3L"
KS3M = "KS3M"
def __str__(self):

View File

@@ -0,0 +1,23 @@
# ------------------------------------------------------------------------------
# Copyright 2024 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.models import MinerModel
from pyasic.miners.device.makes import IceRiverMake
class KS0(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS0
expected_fans = 0

View File

@@ -0,0 +1,23 @@
# ------------------------------------------------------------------------------
# Copyright 2024 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.models import MinerModel
from pyasic.miners.device.makes import IceRiverMake
class KS1(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS1
expected_fans = 4

View File

@@ -17,6 +17,18 @@ from pyasic.device.models import MinerModel
from pyasic.miners.device.makes import IceRiverMake
class KS3(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS3
expected_fans = 4
class KS3L(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS3L
expected_fans = 4
class KS3M(IceRiverMake):
raw_model = MinerModel.ICERIVER.KS3M

View File

@@ -1,2 +1,4 @@
from .KS0 import KS0
from .KS1 import KS1
from .KS2 import KS2
from .KS3 import KS3M
from .KS3 import KS3, KS3L, KS3M

View File

@@ -462,7 +462,11 @@ MINER_CLASSES = {
},
MinerTypes.ICERIVER: {
None: type("IceRiverUnknown", (IceRiver, IceRiverMake), {}),
"KS0": IceRiverKS0,
"KS1": IceRiverKS1,
"KS2": IceRiverKS2,
"KS3": IceRiverKS3,
"KS3L": IceRiverKS3L,
"KS3M": IceRiverKS3M,
},
}

View File

@@ -0,0 +1,6 @@
from pyasic.miners.backends.iceriver import IceRiver
from pyasic.miners.device.models import KS0
class IceRiverKS0(IceRiver, KS0):
pass

View File

@@ -0,0 +1,6 @@
from pyasic.miners.backends.iceriver import IceRiver
from pyasic.miners.device.models import KS1
class IceRiverKS1(IceRiver, KS1):
pass

View File

@@ -1,5 +1,13 @@
from pyasic.miners.backends.iceriver import IceRiver
from pyasic.miners.device.models.iceriver import KS3M
from pyasic.miners.device.models.iceriver import KS3, KS3L, KS3M
class IceRiverKS3(IceRiver, KS3):
pass
class IceRiverKS3L(IceRiver, KS3L):
pass
class IceRiverKS3M(IceRiver, KS3M):

View File

@@ -1,2 +1,4 @@
from .KS0 import IceRiverKS0
from .KS1 import IceRiverKS1
from .KS2 import IceRiverKS2
from .KS3 import IceRiverKS3M
from .KS3 import IceRiverKS3, IceRiverKS3L, IceRiverKS3M