pull/21750/head
ShaneSmiskol 4 years ago
parent 94e8816e46
commit 66e175a601
  1. 17
      selfdrive/thermald/thermald.py

@ -258,15 +258,16 @@ def thermald_thread():
except Exception: except Exception:
cloudlog.exception("Error getting network status") cloudlog.exception("Error getting network status")
try: if TICI:
gsm_roaming = params.get_bool("GsmRoaming") try:
if gsm_roaming != last_gsm_roaming: gsm_roaming = params.get_bool("GsmRoaming")
last_gsm_roaming = gsm_roaming if gsm_roaming != last_gsm_roaming:
home_only = "no" if gsm_roaming else "yes" last_gsm_roaming = gsm_roaming
os.system(f"nmcli connection modify --temporary lte gsm.home-only {home_only}") home_only = "no" if gsm_roaming else "yes"
os.system(f"nmcli connection modify --temporary lte gsm.home-only {home_only}")
except Exception: except Exception:
cloudlog.exception("Error setting roaming") cloudlog.exception("Error setting roaming")
msg.deviceState.freeSpacePercent = get_available_percent(default=100.0) msg.deviceState.freeSpacePercent = get_available_percent(default=100.0)
msg.deviceState.memoryUsagePercent = int(round(psutil.virtual_memory().percent)) msg.deviceState.memoryUsagePercent = int(round(psutil.virtual_memory().percent))

Loading…
Cancel
Save