feature: implement send_config method for boser.

This commit is contained in:
Upstream Data
2024-07-30 13:09:16 -06:00
parent f6500e7d66
commit a2ca79843d

View File

@@ -782,6 +782,11 @@ class BOSer(BraiinsOSFirmware):
return MinerConfig.from_boser(grpc_conf) return MinerConfig.from_boser(grpc_conf)
async def send_config(self, config: MinerConfig, user_suffix: str = None) -> None:
boser_cfg = config.as_boser()
for key in boser_cfg:
await self.web.send_command(key, message=boser_cfg[key])
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( result = await self.web.set_power_target(