adjustor 2.1.3__tar.gz → 2.1.4__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {adjustor-2.1.3/src/adjustor.egg-info → adjustor-2.1.4}/PKG-INFO +1 -1
- {adjustor-2.1.3 → adjustor-2.1.4}/pyproject.toml +1 -1
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/lenovo.py +11 -1
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/lenovo/__init__.py +9 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/lenovo/settings.yml +7 -0
- {adjustor-2.1.3 → adjustor-2.1.4/src/adjustor.egg-info}/PKG-INFO +1 -1
- {adjustor-2.1.3 → adjustor-2.1.4}/LICENSE +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/MANIFEST.in +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/readme.md +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/setup.cfg +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/__init__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/__main__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/__init__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/acpi.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/alib.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/const.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/core/platform.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/__init__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/asus/__init__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/asus/settings.yml +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/smu/__init__.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/smu/qam.yml +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/drivers/smu/smu.yml +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/events.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/hhd.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/settings.yml +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor/utils.py +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor.egg-info/SOURCES.txt +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor.egg-info/dependency_links.txt +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor.egg-info/entry_points.txt +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/src/adjustor.egg-info/requires.txt +0 -0
- {adjustor-2.1.3 → adjustor-2.1.4}/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.
|
3
|
+
Version: 2.1.4
|
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
|
@@ -110,7 +110,7 @@ def set_power_light(enabled: bool):
|
|
110
110
|
|
111
111
|
|
112
112
|
def get_power_light():
|
113
|
-
logger.
|
113
|
+
logger.debug(f"Getting power light status.")
|
114
114
|
if not call(r"\_SB.GZFD.WMAF", [0, 0x01, 0x03], risky=False):
|
115
115
|
return None
|
116
116
|
o = read()
|
@@ -195,6 +195,16 @@ def get_slow_tdp():
|
|
195
195
|
return get_feature(0x0101FF00)
|
196
196
|
|
197
197
|
|
198
|
+
def get_charge_limit():
|
199
|
+
logger.debug(f"Retrieving charge limit.")
|
200
|
+
return get_feature(0x03010001)
|
201
|
+
|
202
|
+
|
203
|
+
def set_charge_limit(enable: bool):
|
204
|
+
logger.info(f"Setting charge limit (80 %) to {enable}.")
|
205
|
+
return set_feature(0x03010001, enable)
|
206
|
+
|
207
|
+
|
198
208
|
def set_steady_tdp(val: int):
|
199
209
|
logger.info(f"Setting steady TDP to {val}.")
|
200
210
|
return set_feature(0x0102FF00, val)
|
@@ -8,9 +8,11 @@ from hhd.plugins.conf import Config
|
|
8
8
|
from adjustor.core.lenovo import (
|
9
9
|
MIN_CURVE,
|
10
10
|
TdpMode,
|
11
|
+
get_charge_limit,
|
11
12
|
get_full_fan_speed,
|
12
13
|
get_power_light,
|
13
14
|
get_tdp_mode,
|
15
|
+
set_charge_limit,
|
14
16
|
set_fan_curve,
|
15
17
|
set_fast_tdp,
|
16
18
|
set_full_fan_speed,
|
@@ -84,6 +86,7 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
84
86
|
if self.startup:
|
85
87
|
conf["tdp.lenovo.ffss"] = get_full_fan_speed()
|
86
88
|
conf["tdp.lenovo.power_light"] = get_power_light()
|
89
|
+
conf["tdp.lenovo.charge_limit"] = get_charge_limit()
|
87
90
|
|
88
91
|
# If not old config, exit, as values can not be set
|
89
92
|
if not self.old_conf:
|
@@ -105,6 +108,12 @@ class LenovoDriverPlugin(HHDPlugin):
|
|
105
108
|
):
|
106
109
|
set_power_light(power_light)
|
107
110
|
|
111
|
+
charge_limit = conf["tdp.lenovo.charge_limit"].to(bool)
|
112
|
+
if charge_limit is not None and charge_limit != self.old_conf[
|
113
|
+
"charge_limit"
|
114
|
+
].to(bool):
|
115
|
+
set_charge_limit(charge_limit)
|
116
|
+
|
108
117
|
#
|
109
118
|
# TDP
|
110
119
|
#
|
@@ -134,6 +134,13 @@ children:
|
|
134
134
|
hint: >-
|
135
135
|
Reset to the original fan curve provided by Lenovo in BIOS V28.
|
136
136
|
|
137
|
+
charge_limit:
|
138
|
+
tags: [advanced]
|
139
|
+
type: bool
|
140
|
+
title: Enable Charge Limit (80%)
|
141
|
+
hint: >-
|
142
|
+
Limits device charging to 80%. Lenovo EC method. Available since BIOSv29.
|
143
|
+
|
137
144
|
power_light:
|
138
145
|
tags: [advanced]
|
139
146
|
type: bool
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: adjustor
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.4
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|