mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-06-27 03:02:05 +08:00
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user