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

This commit is contained in:
Braden
2018-12-25 11:51:07 -06:00
committed by rbiasini
parent f41cb3b4ec
commit 58e716ff48

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)