bug: fix btminer adjust power limit and add poweroff for innosilicon miners (though it breaks the miner)
This commit is contained in:
@@ -767,7 +767,7 @@ class BTMinerAPI(BaseMinerAPI):
|
||||
|
||||
"""
|
||||
return await self.send_privileged_command(
|
||||
"adjust_power_limit", power_limit=power_limit
|
||||
"adjust_power_limit", power_limit=str(power_limit)
|
||||
)
|
||||
|
||||
@api_min_version("2.0.5")
|
||||
|
||||
@@ -71,9 +71,20 @@ class CGMinerA10X(CGMiner, A10X):
|
||||
|
||||
async def stop_mining(self) -> bool:
|
||||
return False
|
||||
# data = await self.web.poweroff()
|
||||
# try:
|
||||
# return data["success"]
|
||||
# except KeyError:
|
||||
# return False
|
||||
|
||||
async def resume_mining(self) -> bool:
|
||||
return False
|
||||
# data = await self.web.restart_cgminer()
|
||||
# print(data)
|
||||
# try:
|
||||
# return data["success"]
|
||||
# except KeyError:
|
||||
# return False
|
||||
|
||||
async def send_config(self, config: MinerConfig, user_suffix: str = None) -> None:
|
||||
self.config = config
|
||||
|
||||
@@ -109,3 +109,6 @@ class InnosiliconWebAPI(BaseWebAPI):
|
||||
|
||||
async def pools(self):
|
||||
return await self.send_command("pools")
|
||||
|
||||
async def poweroff(self):
|
||||
return await self.send_command("poweroff")
|
||||
|
||||
Reference in New Issue
Block a user