adjustor 2.1.2__tar.gz → 2.1.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. {adjustor-2.1.2/src/adjustor.egg-info → adjustor-2.1.3}/PKG-INFO +1 -1
  2. {adjustor-2.1.2 → adjustor-2.1.3}/pyproject.toml +1 -1
  3. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/lenovo/__init__.py +17 -7
  4. {adjustor-2.1.2 → adjustor-2.1.3/src/adjustor.egg-info}/PKG-INFO +1 -1
  5. {adjustor-2.1.2 → adjustor-2.1.3}/LICENSE +0 -0
  6. {adjustor-2.1.2 → adjustor-2.1.3}/MANIFEST.in +0 -0
  7. {adjustor-2.1.2 → adjustor-2.1.3}/readme.md +0 -0
  8. {adjustor-2.1.2 → adjustor-2.1.3}/setup.cfg +0 -0
  9. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/__init__.py +0 -0
  10. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/__main__.py +0 -0
  11. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/__init__.py +0 -0
  12. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/acpi.py +0 -0
  13. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/alib.py +0 -0
  14. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/const.py +0 -0
  15. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/lenovo.py +0 -0
  16. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/core/platform.py +0 -0
  17. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/__init__.py +0 -0
  18. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/asus/__init__.py +0 -0
  19. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/asus/settings.yml +0 -0
  20. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/lenovo/settings.yml +0 -0
  21. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/smu/__init__.py +0 -0
  22. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/smu/qam.yml +0 -0
  23. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/drivers/smu/smu.yml +0 -0
  24. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/events.py +0 -0
  25. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/hhd.py +0 -0
  26. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/settings.yml +0 -0
  27. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor/utils.py +0 -0
  28. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor.egg-info/SOURCES.txt +0 -0
  29. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor.egg-info/dependency_links.txt +0 -0
  30. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor.egg-info/entry_points.txt +0 -0
  31. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor.egg-info/requires.txt +0 -0
  32. {adjustor-2.1.2 → adjustor-2.1.3}/src/adjustor.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 2.1.2
3
+ Version: 2.1.3
4
4
  Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
5
5
  Author-email: Kapenekakis Antheas <pypi@antheas.dev>
6
6
  Project-URL: Homepage, https://github.com/hhd-dev/adjustor
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "adjustor"
3
- version = "2.1.2"
3
+ version = "2.1.3"
4
4
  authors = [
5
5
  { name="Kapenekakis Antheas", email="pypi@antheas.dev" },
6
6
  ]
@@ -8,11 +8,8 @@ from hhd.plugins.conf import Config
8
8
  from adjustor.core.lenovo import (
9
9
  MIN_CURVE,
10
10
  TdpMode,
11
- get_fan_curve,
12
- get_fast_tdp,
13
11
  get_full_fan_speed,
14
12
  get_power_light,
15
- get_steady_tdp,
16
13
  get_tdp_mode,
17
14
  set_fan_curve,
18
15
  set_fast_tdp,
@@ -141,6 +138,14 @@ class LenovoDriverPlugin(HHDPlugin):
141
138
  # Check user changed values
142
139
  steady = conf["tdp.lenovo.tdp.custom.tdp"].to(int)
143
140
 
141
+ old_steady = steady
142
+ if self.enforce_limits:
143
+ steady = min(max(steady, 4), 30)
144
+ else:
145
+ steady = min(max(steady, 0), 50)
146
+ if old_steady != steady:
147
+ conf["tdp.lenovo.tdp.custom.tdp"] = steady
148
+
144
149
  steady_updated = steady and steady != self.old_conf["tdp.custom.tdp"].to(
145
150
  int
146
151
  )
@@ -189,10 +194,15 @@ class LenovoDriverPlugin(HHDPlugin):
189
194
  conf[f"tdp.lenovo.fan.manual.st{(i + 1)*10}"] = v
190
195
 
191
196
  # Handle fan curve limits
192
- if conf["tdp.lenovo.fan.manual.enforce_limits"].to(bool):
193
- for i, v in enumerate(MIN_CURVE):
194
- if conf[f"tdp.lenovo.fan.manual.st{(i + 1)*10}"].to(int) < v:
195
- conf[f"tdp.lenovo.fan.manual.st{(i + 1)*10}"] = v
197
+ for i, v in enumerate(MIN_CURVE):
198
+ val = conf[f"tdp.lenovo.fan.manual.st{(i + 1)*10}"].to(int)
199
+ old_val = val
200
+ if conf["tdp.lenovo.fan.manual.enforce_limits"].to(bool) and val < v:
201
+ val = v
202
+
203
+ val = max(min(val, 115), 0)
204
+ if old_val != val:
205
+ conf[f"tdp.lenovo.fan.manual.st{(i + 1)*10}"] = val
196
206
 
197
207
  # Check if fan curve has changed
198
208
  # Use debounce logic on these changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: adjustor
3
- Version: 2.1.2
3
+ Version: 2.1.3
4
4
  Summary: Adjustor, a userspace program for managing the TDP of handheld devices.
5
5
  Author-email: Kapenekakis Antheas <pypi@antheas.dev>
6
6
  Project-URL: Homepage, https://github.com/hhd-dev/adjustor
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes