Added Power Saving for NRF52 companions

This commit is contained in:
Kevin Le 2026-04-10 10:45:26 +07:00
parent be780491ac
commit bbc26d40d3
3 changed files with 17 additions and 0 deletions

View file

@ -2144,3 +2144,11 @@ bool MyMesh::advert() {
return false;
}
}
// To check if there is pending work
bool MyMesh::hasPendingWork() const {
#if defined(WITH_BRIDGE)
if (bridge.isRunning()) return true; // bridge needs WiFi radio, can't sleep
#endif
return _mgr->getOutboundTotal() > 0;
}