File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
res/themes/3.5inchTheme2_theme Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 22
33import GPUtil
44import psutil
5-
6- if os .name == 'posix' :
5+ try :
76 import pyamdgpuinfo
7+ except ImportError :
8+ pyamdgpuinfo = None
89
910import library .config as config
1011from library .display import display
@@ -133,11 +134,14 @@ def load():
133134
134135 @staticmethod
135136 def is_temperature_available ():
136- if os . name == 'posix' :
137+ try :
137138 if 'coretemp' in psutil .sensors_temperatures () or 'k10temp' in psutil .sensors_temperatures ():
138139 return True
139-
140- return False
140+ else :
141+ return False
142+ except AttributeError :
143+ # sensors_temperatures may not be available at all
144+ return False
141145
142146 @staticmethod
143147 def temperature ():
@@ -299,7 +303,9 @@ def stats():
299303
300304 @staticmethod
301305 def is_available ():
302- return os .name == 'posix' and pyamdgpuinfo .detect_gpus () > 0
306+ if not pyamdgpuinfo :
307+ return False
308+ return pyamdgpuinfo .detect_gpus () > 0
303309
304310
305311class Memory :
Original file line number Diff line number Diff line change 44 DISPLAY_ORIENTATION : portrait
55
66 # Backplate RGB LED color (for HW revision 'flagship' devices only)
7- DISPLAY_RGB_LED : 0, 0, 255
7+ DISPLAY_RGB_LED : [ 0, 0, 255]
88
99static_images :
1010 # Specify what static images we want to show on the display
@@ -298,4 +298,4 @@ STATS:
298298 FONT_SIZE : 23
299299 FONT_COLOR : 255, 255, 255
300300 BACKGROUND_COLOR : 132, 154, 165
301- # BACKGROUND_IMAGE: background.png
301+ # BACKGROUND_IMAGE: background.png
You can’t perform that action at this time.
0 commit comments