@@ -161,13 +161,28 @@ async def atm(self) -> dict:
161
161
"""
162
162
return await self .send_command ("atm" )
163
163
164
- async def atmset (self , command : str ) -> dict :
164
+ async def atmset (
165
+ self ,
166
+ enabled : bool = None ,
167
+ startup_minutes : int = None ,
168
+ post_ramp_minutes : int = None ,
169
+ temp_window : int = None ,
170
+ min_profile : str = None ,
171
+ max_profile : str = None ,
172
+ prevent_oc : bool = None ,
173
+ ) -> dict :
165
174
"""Sets the ATM configuration.
166
175
<details>
167
176
<summary>Expand</summary>
168
177
169
178
Parameters:
170
- command: comma-separated list of key-value pairs, in the format key=value
179
+ enabled: Enable or disable ATM
180
+ startup_minutes: Minimum time (minutes) before ATM starts at system startup
181
+ post_ramp_minutes: Minimum time (minutes) before ATM starts after ramping
182
+ temp_window: Number of degrees below "Hot" temperature where ATM begins adjusting profiles
183
+ min_profile: Lowest profile to use (e.g. "145MHz", "+1", "-2"). Empty string for unbounded
184
+ max_profile: Highest profile to use (e.g. "395MHz", "+1", "-2")
185
+ prevent_oc: When turning off ATM, revert to default profile if in higher profile
171
186
172
187
Returns:
173
188
A dictionary containing status information about the ATM configuration update:
@@ -179,7 +194,22 @@ async def atmset(self, command: str) -> dict:
179
194
- When: Timestamp
180
195
</details>
181
196
"""
182
- return await self .send_privileged_command ("atmset" , command )
197
+ atmset_data = []
198
+ if enabled is not None :
199
+ atmset_data .append (f"enabled={ str (enabled ).lower ()} " )
200
+ if startup_minutes is not None :
201
+ atmset_data .append (f"startup_minutes={ startup_minutes } " )
202
+ if post_ramp_minutes is not None :
203
+ atmset_data .append (f"post_ramp_minutes={ post_ramp_minutes } " )
204
+ if temp_window is not None :
205
+ atmset_data .append (f"temp_window={ temp_window } " )
206
+ if min_profile is not None :
207
+ atmset_data .append (f"min_profile={ min_profile } " )
208
+ if max_profile is not None :
209
+ atmset_data .append (f"max_profile={ max_profile } " )
210
+ if prevent_oc is not None :
211
+ atmset_data .append (f"prevent_oc={ str (prevent_oc ).lower ()} " )
212
+ return await self .send_privileged_command ("atmset" , * atmset_data )
183
213
184
214
async def check (self , command : str ) -> dict :
185
215
"""Check if the command `command` exists in LUXMiner.
0 commit comments