Prefer EXT_PWR_DETECT pin over chargingVolt to detect power unplugged (#9511)

This commit is contained in:
Jonathan Bennett
2026-02-03 00:13:49 -06:00
committed by GitHub
parent 0022148323
commit f514bc230b

View File

@@ -459,6 +459,8 @@ class AnalogBatteryLevel : public HasBatteryLevel
}
// if it's not HIGH - check the battery
#endif
// If we have an EXT_PWR_DETECT pin and it indicates no external power, believe it.
return false;
// technically speaking this should work for all(?) NRF52 boards
// but needs testing across multiple devices. NRF52 USB would not even work if