mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +01:00
remove time and default values for onoff and max_freq
This commit is contained in:
parent
dc92542342
commit
84b2c36953
@ -4,7 +4,6 @@ import glob
|
|||||||
import os
|
import os
|
||||||
import sys,getopt
|
import sys,getopt
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
|
||||||
|
|
||||||
# The gearings below were picked based on various tests by the ClockworkPi devs.
|
# The gearings below were picked based on various tests by the ClockworkPi devs.
|
||||||
# The maximum-performance maximum-power gearing is present for completeness, but
|
# The maximum-performance maximum-power gearing is present for completeness, but
|
||||||
@ -112,8 +111,6 @@ class A04:
|
|||||||
|
|
||||||
def get_cpu_on_off(self,cpu_num):
|
def get_cpu_on_off(self,cpu_num):
|
||||||
cpu_onoff_file = "/sys/devices/system/cpu/cpu%d/online" % cpu_num
|
cpu_onoff_file = "/sys/devices/system/cpu/cpu%d/online" % cpu_num
|
||||||
onoff = "0"
|
|
||||||
max_freq = "0"
|
|
||||||
with open(cpu_onoff_file,"r") as f: onoff = f.read().strip()
|
with open(cpu_onoff_file,"r") as f: onoff = f.read().strip()
|
||||||
if onoff == "1":
|
if onoff == "1":
|
||||||
cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num
|
cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import glob
|
|||||||
import os
|
import os
|
||||||
import sys,getopt
|
import sys,getopt
|
||||||
import subprocess
|
import subprocess
|
||||||
import time
|
|
||||||
|
|
||||||
# The gearings below were picked based on various tests by the ClockworkPi devs.
|
# The gearings below were picked based on various tests by the ClockworkPi devs.
|
||||||
# The maximum-performance maximum-power gearing is present for completeness, but
|
# The maximum-performance maximum-power gearing is present for completeness, but
|
||||||
@ -142,8 +141,6 @@ class A06:
|
|||||||
|
|
||||||
def get_cpu_on_off(self,cpu_num):
|
def get_cpu_on_off(self,cpu_num):
|
||||||
cpu_onoff_file = "/sys/devices/system/cpu/cpu%d/online" % cpu_num
|
cpu_onoff_file = "/sys/devices/system/cpu/cpu%d/online" % cpu_num
|
||||||
onoff = "0"
|
|
||||||
max_freq = "0"
|
|
||||||
with open(cpu_onoff_file,"r") as f: onoff = f.read().strip()
|
with open(cpu_onoff_file,"r") as f: onoff = f.read().strip()
|
||||||
if onoff == "1":
|
if onoff == "1":
|
||||||
cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num
|
cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user