Read from usb/present instead of usb/online (#484)

old-commit-hash: 58e716ff48
This commit is contained in:
Braden
2018-12-25 11:51:07 -06:00
committed by rbiasini
parent 27c67bcebf
commit 4527347d71
+1 -1
View File
@@ -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)