From 9798b12384cb4c5a71574fcb4abb283cdaaaeacb Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Thu, 10 Oct 2019 13:58:03 +1000 Subject: [PATCH 1/3] Update APK From d130c6c9a20deb17ba3778fbe9e51eb57cea88d0 Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Thu, 10 Oct 2019 14:09:09 +1000 Subject: [PATCH 2/3] Fix unable to display ip address issue --- selfdrive/thermald.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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 From 83c6eca4a1331925b5cd3bbb05fd094c42ed541d Mon Sep 17 00:00:00 2001 From: dragonpilot Date: Thu, 10 Oct 2019 14:34:18 +1000 Subject: [PATCH 3/3] Fix unavailable variable issue --- selfdrive/thermald.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index ac998a2cc..9642ef3c4 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -156,6 +156,7 @@ def thermald_thread(): dragon_charging_ctrl = True if params.get('DragonChargingCtrl') == "1" else False dragon_charging_max = int(params.get('DragonCharging')) dragon_discharging_min = int(params.get('DragonDisCharging')) + charging_disabled = False while 1: health = messaging.recv_sock(health_sock, wait=True)