mirror of
https://github.com/AdnanHodzic/auto-cpufreq.git
synced 2025-07-27 07:34:25 +02:00
enable_tresholds config file improvements (Closes: #641)
This commit is contained in:
parent
3e8ee20117
commit
005b4aa178
@ -35,11 +35,14 @@ def battery_stop_threshold():
|
|||||||
def battery_setup():
|
def battery_setup():
|
||||||
root_check()
|
root_check()
|
||||||
conf = get_config()
|
conf = get_config()
|
||||||
if conf.has_option("battery", "enable_thresholds") and conf["battery"]["enable_thresholds"] == "true":
|
if conf.has_option("battery", "enable_thresholds"):
|
||||||
if lsmod("thinkpad_acpi"):
|
if conf["battery"]["enable_thresholds"] == "true":
|
||||||
thinkpad_setup(battery_start_threshold(), battery_stop_threshold())
|
if lsmod("thinkpad_acpi"):
|
||||||
elif lsmod("ideapad_acpi"):
|
thinkpad_setup(battery_start_threshold(), battery_stop_threshold())
|
||||||
ideapad_setup(battery_start_threshold(), battery_stop_threshold())
|
elif lsmod("ideapad_acpi"):
|
||||||
|
ideapad_setup(battery_start_threshold(), battery_stop_threshold())
|
||||||
|
else:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
@ -48,13 +51,16 @@ def battery_setup():
|
|||||||
|
|
||||||
def battery_get_thresholds():
|
def battery_get_thresholds():
|
||||||
conf = get_config()
|
conf = get_config()
|
||||||
if conf["battery"]["enable_thresholds"] == "true":
|
if conf.has_option("battery", "enable_thresholds"):
|
||||||
print("-" * 30)
|
if conf["battery"]["enable_thresholds"] == "true":
|
||||||
if lsmod("thinkpad_acpi"):
|
print("-" * 30 )
|
||||||
thinkpad_print_thresholds()
|
if lsmod("thinkpad_acpi"):
|
||||||
elif lsmod("ideapad_acpi"):
|
thinkpad_print_thresholds()
|
||||||
ideapad_print_thresholds()
|
elif lsmod("ideapad_acpi"):
|
||||||
|
ideapad_print_thresholds()
|
||||||
|
else:
|
||||||
|
pass
|
||||||
else:
|
else:
|
||||||
pass
|
return
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user