add get_config to ePIC backend

This commit is contained in:
John-Paul Compagnone
2023-12-21 01:33:46 -05:00
parent b89ea1fa92
commit 6f6f5743cf
6 changed files with 83 additions and 0 deletions

View File

@@ -160,6 +160,13 @@ class MinerConfig:
temperature=TemperatureConfig.from_bosminer(toml_conf),
power_scaling=PowerScalingConfig.from_bosminer(toml_conf),
)
@classmethod
def from_epic(cls, web_conf: dict) -> "MinerConfig":
return cls(pools=PoolConfig.from_epic(web_conf),
fan_mode=FanModeConfig.from_epic(web_conf),
temperature=TemperatureConfig.from_epic(web_conf),
mining_mode=MiningModeConfig.from_epic(web_conf))
def merge(a: dict, b: dict) -> dict: