Squash Whatsminer LED bug
old implementation broke command syntax due to since required command parameters would be left off in certain cases.
This commit is contained in:
@@ -189,10 +189,7 @@ class BTMinerAPI(BaseMinerAPI):
|
|||||||
self, command: Union[str, bytes], ignore_errors: bool = False, **kwargs
|
self, command: Union[str, bytes], ignore_errors: bool = False, **kwargs
|
||||||
) -> dict:
|
) -> dict:
|
||||||
logging.debug(f"{self} - (Send Privileged Command) - {command} " + f'with args {kwargs}' if len(kwargs) > 0 else '')
|
logging.debug(f"{self} - (Send Privileged Command) - {command} " + f'with args {kwargs}' if len(kwargs) > 0 else '')
|
||||||
command = {"cmd": command}
|
command = {"cmd": command, **kwargs}
|
||||||
for kwarg in kwargs:
|
|
||||||
if kwargs[kwarg]:
|
|
||||||
command[kwarg] = kwargs[kwarg]
|
|
||||||
|
|
||||||
token_data = await self.get_token()
|
token_data = await self.get_token()
|
||||||
enc_command = create_privileged_cmd(token_data, command)
|
enc_command = create_privileged_cmd(token_data, command)
|
||||||
|
|||||||
Reference in New Issue
Block a user