coroutine: kinda works now

This commit is contained in:
Kevin Hester
2020-10-10 09:57:57 +08:00
parent 4b9ea4f808
commit 49b4ed2a89
31 changed files with 392 additions and 150 deletions

View File

@@ -134,7 +134,7 @@ void Power::readPowerStatus()
}
}
uint32_t Power::runOnce()
int32_t Power::runOnce()
{
readPowerStatus();
@@ -173,7 +173,7 @@ uint32_t Power::runOnce()
#endif
// Only read once every 20 seconds once the power status for the app has been initialized
return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : 0;
return (statusHandler && statusHandler->isInitialized()) ? (1000 * 20) : RUN_SAME;
}
/**