Skip to content

Commit

Permalink
improve how the fault light looks on whatsminers
Browse files Browse the repository at this point in the history
  • Loading branch information
UpstreamData committed Aug 11, 2022
1 parent 1f59ef0 commit ee45f23
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyasic/API/btminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ async def set_led(
self,
auto: bool = True,
color: str = "red",
period: int = 2000,
duration: int = 1000,
period: int = 60,
duration: int = 20,
start: int = 0,
) -> dict:
"""Set the LED on the miner using the API.
Expand Down
3 changes: 3 additions & 0 deletions pyasic/miners/_backends/btminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ async def fault_light_off(self) -> bool:
async def fault_light_on(self) -> bool:
try:
data = await self.api.set_led(auto=False)
await self.api.set_led(
auto=False, color="green", start=0, period=1, duration=0
)
except APIError:
return False
if data:
Expand Down

0 comments on commit ee45f23

Please sign in to comment.