From 84b2c369539d92ae5784a2e036966a4f19347c13 Mon Sep 17 00:00:00 2001 From: Elisha Hollander Date: Sun, 9 Jan 2022 14:08:57 +0200 Subject: [PATCH] remove `time` and default values for `onoff` and `max_freq` --- Code/A04/devterm-a04-gearbox | 3 --- Code/A06/devterm-a06-gearbox | 3 --- 2 files changed, 6 deletions(-) diff --git a/Code/A04/devterm-a04-gearbox b/Code/A04/devterm-a04-gearbox index f12deaa..3078981 100755 --- a/Code/A04/devterm-a04-gearbox +++ b/Code/A04/devterm-a04-gearbox @@ -4,7 +4,6 @@ import glob import os import sys,getopt import subprocess -import time # The gearings below were picked based on various tests by the ClockworkPi devs. # 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): 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() if onoff == "1": cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num diff --git a/Code/A06/devterm-a06-gearbox b/Code/A06/devterm-a06-gearbox index 9d5edf5..41c44a9 100755 --- a/Code/A06/devterm-a06-gearbox +++ b/Code/A06/devterm-a06-gearbox @@ -4,7 +4,6 @@ import glob import os import sys,getopt import subprocess -import time # The gearings below were picked based on various tests by the ClockworkPi devs. # 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): 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() if onoff == "1": cpu_max_freq_file = "/sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq" % cpu_num