Merge branch 'UpstreamData:master' into add_blockminer_support
This commit is contained in:
22
pyasic/miners/antminer/luxos/X19/S19.py
Normal file
22
pyasic/miners/antminer/luxos/X19/S19.py
Normal file
@@ -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 LUXMiner
|
||||||
|
from pyasic.miners.models import S19
|
||||||
|
|
||||||
|
|
||||||
|
class LUXMinerS19(LUXMiner, S19):
|
||||||
|
pass
|
||||||
17
pyasic/miners/antminer/luxos/X19/__init__.py
Normal file
17
pyasic/miners/antminer/luxos/X19/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# 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 .S19 import LUXMinerS19
|
||||||
@@ -15,3 +15,4 @@
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
from .X9 import *
|
from .X9 import *
|
||||||
|
from .X19 import *
|
||||||
|
|||||||
22
pyasic/miners/antminer/vnish/X7/L7.py
Normal file
22
pyasic/miners/antminer/vnish/X7/L7.py
Normal file
@@ -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 VNish
|
||||||
|
from pyasic.miners.models import L7
|
||||||
|
|
||||||
|
|
||||||
|
class VnishL7(VNish, L7):
|
||||||
|
pass
|
||||||
17
pyasic/miners/antminer/vnish/X7/__init__.py
Normal file
17
pyasic/miners/antminer/vnish/X7/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# 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 .L7 import VnishL7
|
||||||
@@ -15,5 +15,6 @@
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
from .X3 import *
|
from .X3 import *
|
||||||
|
from .X7 import *
|
||||||
from .X17 import *
|
from .X17 import *
|
||||||
from .X19 import *
|
from .X19 import *
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ from pyasic.miners.data import (
|
|||||||
from pyasic.rpc.bosminer import BOSMinerRPCAPI
|
from pyasic.rpc.bosminer import BOSMinerRPCAPI
|
||||||
from pyasic.ssh.braiins_os import BOSMinerSSH
|
from pyasic.ssh.braiins_os import BOSMinerSSH
|
||||||
from pyasic.web.braiins_os import BOSerWebAPI, BOSMinerWebAPI
|
from pyasic.web.braiins_os import BOSerWebAPI, BOSMinerWebAPI
|
||||||
|
from pyasic.web.braiins_os.proto.braiins.bos.v1 import SaveAction
|
||||||
|
|
||||||
BOSMINER_DATA_LOC = DataLocations(
|
BOSMINER_DATA_LOC = DataLocations(
|
||||||
**{
|
**{
|
||||||
@@ -691,7 +692,9 @@ class BOSer(BaseMiner):
|
|||||||
|
|
||||||
async def set_power_limit(self, wattage: int) -> bool:
|
async def set_power_limit(self, wattage: int) -> bool:
|
||||||
try:
|
try:
|
||||||
result = await self.web.set_power_target(wattage)
|
result = await self.web.set_power_target(
|
||||||
|
wattage, save_action=SaveAction.SAVE_ACTION_SAVE_AND_FORCE_APPLY
|
||||||
|
)
|
||||||
except APIError:
|
except APIError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@@ -373,7 +373,9 @@ MINER_CLASSES = {
|
|||||||
},
|
},
|
||||||
MinerTypes.VNISH: {
|
MinerTypes.VNISH: {
|
||||||
None: VNish,
|
None: VNish,
|
||||||
|
"L3+": VnishL3Plus,
|
||||||
"ANTMINER L3+": VnishL3Plus,
|
"ANTMINER L3+": VnishL3Plus,
|
||||||
|
"ANTMINER L7": VnishL7,
|
||||||
"ANTMINER S17+": VNishS17Plus,
|
"ANTMINER S17+": VNishS17Plus,
|
||||||
"ANTMINER S17 PRO": VNishS17Pro,
|
"ANTMINER S17 PRO": VNishS17Pro,
|
||||||
"ANTMINER S19": VNishS19,
|
"ANTMINER S19": VNishS19,
|
||||||
@@ -404,6 +406,7 @@ MINER_CLASSES = {
|
|||||||
MinerTypes.LUX_OS: {
|
MinerTypes.LUX_OS: {
|
||||||
None: LUXMiner,
|
None: LUXMiner,
|
||||||
"ANTMINER S9": LUXMinerS9,
|
"ANTMINER S9": LUXMinerS9,
|
||||||
|
"ANTMINER S19": LUXMinerS19,
|
||||||
},
|
},
|
||||||
MinerTypes.AURADINE: {
|
MinerTypes.AURADINE: {
|
||||||
None: type("GoldshellUnknown", (Auradine, AuradineMake), {}),
|
None: type("GoldshellUnknown", (Auradine, AuradineMake), {}),
|
||||||
|
|||||||
Reference in New Issue
Block a user