move M32 to separate file.

This commit is contained in:
UpstreamData
2022-08-10 11:14:06 -06:00
parent 5d49135b59
commit b8239703c1
6 changed files with 52 additions and 18 deletions

View File

@@ -0,0 +1,24 @@
# 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 import BaseMiner
class M32(BaseMiner):
def __init__(self, ip: str):
super().__init__()
self.ip = ip
self.model = "M32"
self.nominal_chips = 74
self.fan_count = 2

View File

@@ -22,12 +22,3 @@ class M32S(BaseMiner):
self.model = "M32S"
self.nominal_chips = 78
self.fan_count = 2
class M32(BaseMiner):
def __init__(self, ip: str):
super().__init__()
self.ip = ip
self.model = "M32"
self.nominal_chips = 74
self.fan_count = 2

View File

@@ -19,4 +19,5 @@ from .M30S_Plus_Plus import M30SPlusPlus, M30SPlusPlusVG30, M30SPlusPlusVG40
from .M31S import M31S
from .M31S_Plus import M31SPlus, M31SPlusVE20
from .M32S import M32S, M32
from .M32 import M32
from .M32S import M32S

View File

@@ -0,0 +1,24 @@
# 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 BTMiner # noqa - Ignore access to _module
from pyasic.miners._types import (
M32,
) # noqa - Ignore access to _module
class BTMinerM32(BTMiner, M32):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip

View File

@@ -15,7 +15,6 @@
from pyasic.miners._backends import BTMiner # noqa - Ignore access to _module
from pyasic.miners._types import (
M32S,
M32,
) # noqa - Ignore access to _module
@@ -23,9 +22,3 @@ class BTMinerM32S(BTMiner, M32S):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip
class BTMinerM32(BTMiner, M32):
def __init__(self, ip: str) -> None:
super().__init__(ip)
self.ip = ip

View File

@@ -34,4 +34,5 @@ from .M30S_Plus_Plus import (
from .M31S import BTMinerM31S
from .M31S_Plus import BTMinerM31SPlus, BTMinerM31SPlusVE20
from .M32S import BTMinerM32S, BTMinerM32
from .M32 import BTMinerM32
from .M32S import BTMinerM32S