no thermal on pc

old-commit-hash: 2716e37b28
This commit is contained in:
Comma User
2020-02-28 20:27:41 -08:00
parent 92dc82102c
commit 7733ff9191
+3
View File
@@ -31,6 +31,9 @@ with open(BASEDIR + "/selfdrive/controls/lib/alerts_offroad.json") as json_file:
OFFROAD_ALERTS = json.load(json_file)
def read_tz(x, clip=True):
if not ANDROID:
# we don't monitor thermal on PC
return 0
try:
with open("/sys/devices/virtual/thermal/thermal_zone%d/temp" % x) as f:
ret = int(f.read())