From 58e716ff48e702b712b024c7ca97cd9ef635ec46 Mon Sep 17 00:00:00 2001 From: Braden Date: Tue, 25 Dec 2018 11:51:07 -0600 Subject: [PATCH] Read from usb/present instead of usb/online (#484) --- selfdrive/thermald.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/thermald.py b/selfdrive/thermald.py index 7f39d310d7..78c4aa1490 100755 --- a/selfdrive/thermald.py +++ b/selfdrive/thermald.py @@ -201,7 +201,7 @@ def thermald_thread(): msg.thermal.batteryCurrent = int(f.read()) with open("/sys/class/power_supply/battery/voltage_now") as f: msg.thermal.batteryVoltage = int(f.read()) - with open("/sys/class/power_supply/usb/online") as f: + with open("/sys/class/power_supply/usb/present") as f: msg.thermal.usbOnline = bool(int(f.read())) current_filter.update(msg.thermal.batteryCurrent / 1e6)