clean up PeriodicTask so I can eventually use it with a scheduler

This commit is contained in:
geeksville
2020-04-25 10:59:40 -07:00
parent 2061706c11
commit 64f6c0f5c0
8 changed files with 114 additions and 63 deletions

View File

@@ -384,7 +384,6 @@ void _screen_header()
if (!disp)
return;
// Message count
//snprintf(buffer, sizeof(buffer), "#%03d", ttn_get_count() % 1000);
//display->setTextAlignment(TEXT_ALIGN_LEFT);
@@ -423,6 +422,8 @@ void Screen::handleSetOn(bool on)
void Screen::setup()
{
PeriodicTask::setup();
// We don't set useDisplay until setup() is called, because some boards have a declaration of this object but the device
// is never found when probing i2c and therefore we don't call setup and never want to do (invalid) accesses to this device.
useDisplay = true;