File tree 2 files changed +14
-8
lines changed
res/themes/3.5inchTheme2_theme
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import GPUtil
4
4
import psutil
5
-
6
- if os .name == 'posix' :
5
+ try :
7
6
import pyamdgpuinfo
7
+ except ImportError :
8
+ pyamdgpuinfo = None
8
9
9
10
import library .config as config
10
11
from library .display import display
@@ -133,11 +134,14 @@ def load():
133
134
134
135
@staticmethod
135
136
def is_temperature_available ():
136
- if os . name == 'posix' :
137
+ try :
137
138
if 'coretemp' in psutil .sensors_temperatures () or 'k10temp' in psutil .sensors_temperatures ():
138
139
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
141
145
142
146
@staticmethod
143
147
def temperature ():
@@ -299,7 +303,9 @@ def stats():
299
303
300
304
@staticmethod
301
305
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
303
309
304
310
305
311
class Memory :
Original file line number Diff line number Diff line change 4
4
DISPLAY_ORIENTATION : portrait
5
5
6
6
# Backplate RGB LED color (for HW revision 'flagship' devices only)
7
- DISPLAY_RGB_LED : 0, 0, 255
7
+ DISPLAY_RGB_LED : [ 0, 0, 255]
8
8
9
9
static_images :
10
10
# Specify what static images we want to show on the display
@@ -298,4 +298,4 @@ STATS:
298
298
FONT_SIZE : 23
299
299
FONT_COLOR : 255, 255, 255
300
300
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