Skip to content

Commit 2f0fe4e

Browse files
committed
Use the dedicated isVbusIn() function for detecting USB plug
1 parent de26dfe commit 2f0fe4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Power.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ class LipoCharger : public HasBatteryLevel
14531453
/**
14541454
* return true if there is an external power source detected
14551455
*/
1456-
virtual bool isVbusIn() override { return PPM->getVbusVoltage() > 0; }
1456+
virtual bool isVbusIn() override { return PPM->isVbusIn(); }
14571457

14581458
/**
14591459
* return true if the battery is currently charging

0 commit comments

Comments
 (0)