cleanup period stuff for new scheduler

This commit is contained in:
geeksville committed 2020-02-21 10:20:47 -08:00
1 parent d4efb2c44c
commit a6b98bec1f
5 files changed
+14 -7

No files matched your search

+6 -2
View File
@@ -12,8 +12,12 @@ void PeriodicTask::loop()
if (period && (now - lastMsec) >= period)
{
lastMsec = now;
period = doTask();
doTask();
}
}
uint32_t Periodic::doTask() { return callback(); }
void Periodic::doTask()
{
uint32_t p = callback();
setPeriod(p);
}