Add all the currently known Whatsminer M6X machines (#77)

* Create new BTMiner M6X backend class to represent Whatsminer new M6X generation

* Add all new known types of Whatsminer M6X

* Ensure all new types are imported in their respective __init__.py

* Create all BTMiner API class for known types of new M6X generation

* Ensure all new BTMiner API class are imported in __init__.py

* Fix erroneous M6X models data

* Ensure M6X miners are imported and add them to their MinerTypes dictionary in miner_factory.py
This commit is contained in:
checksum0
2023-12-12 23:32:12 -03:00
committed by Upstream Data
parent 67aed79330
commit 497ffb5bc0
19 changed files with 673 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M60VK10,
M60VK20,
M60VK30,
M60VK40,
)
class BTMinerM60VK10(M6X, M60VK10):
pass
class BTMinerM60VK20(M6X, M60VK20):
pass
class BTMinerM60VK30(M6X, M60VK30):
pass
class BTMinerM60VK40(M6X, M60VK40):
pass

View File

@@ -0,0 +1,39 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M60SVK10,
M60SVK20,
M60SVK30,
M60SVK40,
)
class BTMinerM60SVK10(M6X, M60SVK10):
pass
class BTMinerM60SVK20(M6X, M60SVK20):
pass
class BTMinerM60SVK30(M6X, M60SVK30):
pass
class BTMinerM60SVK40(M6X, M60SVK40):
pass

View File

@@ -0,0 +1,34 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M63VK10,
M63VK20,
M63VK30,
)
class BTMinerM63VK10(M6X, M63VK10):
pass
class BTMinerM63VK20(M6X, M63VK20):
pass
class BTMinerM63VK30(M6X, M63VK30):
pass

View File

@@ -0,0 +1,34 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M63SVK10,
M63SVK20,
M63SVK30,
)
class BTMinerM63SVK10(M6X, M63SVK10):
pass
class BTMinerM63SVK20(M6X, M63SVK20):
pass
class BTMinerM63SVK30(M6X, M63SVK30):
pass

View File

@@ -0,0 +1,29 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M66VK20,
M66VK30,
)
class BTMinerM66VK20(M6X, M66VK20):
pass
class BTMinerM66VK30(M6X, M66VK30):
pass

View File

@@ -0,0 +1,34 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 M6X
from pyasic.miners.types import (
M66SVK20,
M66SVK30,
M66SVK40,
)
class BTMinerM66SVK20(M6X, M66SVK20):
pass
class BTMinerM66SVK30(M6X, M66SVK30):
pass
class BTMinerM66SVK40(M6X, M66SVK40):
pass

View File

@@ -0,0 +1,52 @@
# ------------------------------------------------------------------------------
# Copyright 2023 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 .M60 import (
BTMinerM60VK10,
BTMinerM60VK20,
BTMinerM60VK30,
BTMinerM60VK40,
)
from .M60S import (
BTMinerM60SVK10,
BTMinerM60SVK20,
BTMinerM60SVK30,
BTMinerM60SVK40,
)
from .M63 import (
BTMinerM63VK10,
BTMinerM63VK20,
BTMinerM63VK30,
)
from .M63S import (
BTMinerM63SVK10,
BTMinerM63SVK20,
BTMinerM63SVK30,
)
from .M66 import (
BTMinerM66VK20,
BTMinerM66VK30,
)
from .M66S import (
BTMinerM66SVK20,
BTMinerM66SVK30,
BTMinerM66SVK40,
)

View File

@@ -17,3 +17,4 @@
from .M2X import *
from .M3X import *
from .M5X import *
from .M6X import *