mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-03-01 04:43:53 +08:00
Read from usb/present instead of usb/online (#484)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user