Use the dedicated isVbusIn() function for detecting USB plug

This commit is contained in:
Jonathan Bennett
2025-11-28 16:42:14 -06:00
parent de26dfe468
commit 2f0fe4e5da

View File

@@ -1453,7 +1453,7 @@ class LipoCharger : public HasBatteryLevel
/**
* return true if there is an external power source detected
*/
virtual bool isVbusIn() override { return PPM->getVbusVoltage() > 0; }
virtual bool isVbusIn() override { return PPM->isVbusIn(); }
/**
* return true if the battery is currently charging