diff --git a/pyasic/miners/base.py b/pyasic/miners/base.py index 1ad18b6a..e60fe896 100644 --- a/pyasic/miners/base.py +++ b/pyasic/miners/base.py @@ -561,27 +561,18 @@ class BaseMiner(MinerProtocol): if self._ssh_cls is not None: self.ssh = self._ssh_cls(ip) - async def upgrade_firmware(self, file: str = None, url: str = None, version: str = "latest") -> bool: + async def upgrade_firmware(self, *, file: str = None, url: str = None, version: str = "latest", keep_settings: bool = True) -> bool: """Upgrade the firmware of the miner. Parameters: file: The file path to the firmware to upgrade from. url: The URL to download the firmware from. version: The version of the firmware to upgrade to. + keep_settings: Whether to keep the current settings during the upgrade. Returns: A boolean value of the success of the firmware upgrade. """ - try: - if file is not None: - await self.web.send_command("firmware-upgrade", file=file) - elif url is not None: - await self.web.send_command("firmware-upgrade", url=url) - else: - await self.web.send_command("firmware-upgrade", version=version) - return True - except Exception as e: - logging.error(f"Firmware upgrade failed: {e}") - return False + return False AnyMiner = TypeVar("AnyMiner", bound=BaseMiner) \ No newline at end of file