Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion library/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def load_theme():


def check_theme_compatible(display_size: str):
global THEME_DATA
# Check if theme is compatible with hardware revision
if display_size != THEME_DATA['display'].get("DISPLAY_SIZE", '3.5"'):
logger.error("The selected theme " + CONFIG_DATA['config'][
Expand Down
2 changes: 0 additions & 2 deletions library/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def decorator(func):

def periodic(scheduler, periodic_interval, action, actionargs=()):
""" Wrap the scheduler with our periodic interval """
global STOPPING
if not STOPPING:
# If the program is not stopping: re-schedule the task for future execution
scheduler.enter(periodic_interval, 1, periodic,
Expand Down Expand Up @@ -188,7 +187,6 @@ def PingStats():
@schedule(timedelta(milliseconds=1).total_seconds())
def QueueHandler():
# Do next action waiting in the queue
global STOPPING
if STOPPING:
# Empty the action queue to allow program to exit cleanly
while not config.update_queue.empty():
Expand Down
5 changes: 0 additions & 5 deletions library/sensors/sensors_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ class Gpu(sensors.Gpu):
@staticmethod
def stats() -> Tuple[
float, float, float, float, float]: # load (%) / used mem (%) / used mem (Mb) / total mem (Mb) / temp (°C)
global DETECTED_GPU
if DETECTED_GPU == GpuType.AMD:
return GpuAmd.stats()
elif DETECTED_GPU == GpuType.NVIDIA:
Expand All @@ -185,7 +184,6 @@ def stats() -> Tuple[

@staticmethod
def fps() -> int:
global DETECTED_GPU
if DETECTED_GPU == GpuType.AMD:
return GpuAmd.fps()
elif DETECTED_GPU == GpuType.NVIDIA:
Expand All @@ -195,7 +193,6 @@ def fps() -> int:

@staticmethod
def fan_percent() -> float:
global DETECTED_GPU
if DETECTED_GPU == GpuType.AMD:
return GpuAmd.fan_percent()
elif DETECTED_GPU == GpuType.NVIDIA:
Expand All @@ -205,7 +202,6 @@ def fan_percent() -> float:

@staticmethod
def frequency() -> float:
global DETECTED_GPU
if DETECTED_GPU == GpuType.AMD:
return GpuAmd.frequency()
elif DETECTED_GPU == GpuType.NVIDIA:
Expand Down Expand Up @@ -471,7 +467,6 @@ class Net(sensors.Net):
@staticmethod
def stats(if_name, interval) -> Tuple[
int, int, int, int]: # up rate (B/s), uploaded (B), dl rate (B/s), downloaded (B)
global PNIC_BEFORE
try:
# Get current counters
pnic_after = psutil.net_io_counters(pernic=True)
Expand Down
2 changes: 0 additions & 2 deletions theme-editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ def on_button1_press(event):


def on_button1_press_and_drag(event):
global x0, y0
display_width, display_height = int(display.lcd.get_width() / RESIZE_FACTOR), int(
display.lcd.get_height() / RESIZE_FACTOR)
x1, y1 = event.x, event.y
Expand All @@ -186,7 +185,6 @@ def on_button1_press_and_drag(event):


def on_button1_release(event):
global x0, y0
display_width, display_height = int(display.lcd.get_width() / RESIZE_FACTOR), int(
display.lcd.get_height() / RESIZE_FACTOR)
x1, y1 = event.x, event.y
Expand Down