diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index fef26c3a1..ac998a2cc 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -193,16 +193,9 @@ def thermald_thread(): ts = sec_since_boot() if ts - ts_last_ip > 10.: try: - result = subprocess.check_output(["service", "call", "connectivity", "2"]).strip().split("\n") - except subprocess.CalledProcessError: - return False - - data = ''.join(''.join(w.decode("hex")[::-1] for w in l[14:49].split()) for l in result[1:]) - - if "\x00".join("WIFI") in data: - result = subprocess.check_output(["ifconfig", "wlan0"]) + result = subprocess.check_output(["ifconfig", "wlan0"], encoding='utf8') # pylint: disable=unexpected-keyword-arg ip_addr = re.findall(r"inet addr:((\d+\.){3}\d+)", result)[0][0] - else: + except: ip_addr = 'N/A' ts_last_ip = ts msg.thermal.ipAddr = ip_addr