Add check for initialized state
This commit is contained in:
@ -21,9 +21,9 @@ SchedulerTask::SchedulerTask(const char *name, void (&setupCallback)(), void (&l
|
|||||||
|
|
||||||
void SchedulerTask::loop()
|
void SchedulerTask::loop()
|
||||||
{
|
{
|
||||||
if (m_lastUpdate && espchrono::ago(*m_lastUpdate) < m_loopInterval)
|
if (!m_wasInitialized || (m_lastUpdate && espchrono::ago(*m_lastUpdate) < m_loopInterval))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ESP_LOGV(TAG, "start %s", m_name);
|
ESP_LOGV(TAG, "start %s", m_name);
|
||||||
|
|
||||||
if (m_intervalImportant)
|
if (m_intervalImportant)
|
||||||
|
Reference in New Issue
Block a user