Compare commits

..

No commits in common. "0af7f838ab8640796f859c00cec58f15ac4647c8" and "43d61a550c6d6924708d4f370d0fa7e7b286db5a" have entirely different histories.

4 changed files with 3 additions and 22 deletions

View File

@ -95,10 +95,8 @@ void InkHUD::LogoApplet::onShutdown()
inverted = true;
inkhud->forceUpdate(Drivers::EInk::FULL, false);
delay(1000); // Cooldown. Back to back updates aren't great for health.
inverted = false;
inkhud->forceUpdate(Drivers::EInk::FULL, false);
delay(1000); // Cooldown
// Prepare for the powered-off screen now
// We can change these values because the initial "shutting down" screen has already rendered at this point
@ -110,19 +108,6 @@ void InkHUD::LogoApplet::onShutdown()
// This is then drawn by InkHUD::Events::onShutdown, with a blocking FULL update, after InkHUD's flash write is complete
}
void InkHUD::LogoApplet::onReboot()
{
bringToForeground();
textLeft = "";
textRight = "";
textTitle = "Rebooting...";
fontTitle = fontSmall;
inkhud->forceUpdate(Drivers::EInk::FULL, false);
// Perform the update right now, waiting here until complete
}
int32_t InkHUD::LogoApplet::runOnce()
{
sendToBackground();

View File

@ -25,7 +25,6 @@ class LogoApplet : public SystemApplet, public concurrency::OSThread
void onForeground() override;
void onBackground() override;
void onShutdown() override;
void onReboot() override;
protected:
int32_t runOnce() override;

View File

@ -95,7 +95,6 @@ int InkHUD::Events::beforeDeepSleep(void *unused)
// We're updating to show that one now.
inkhud->forceUpdate(Drivers::EInk::UpdateTypes::FULL, false);
delay(1000); // Cooldown, before potentially yanking display power
return 0; // We agree: deep sleep now
}
@ -112,16 +111,16 @@ int InkHUD::Events::beforeReboot(void *unused)
a->onDeactivate();
a->onShutdown();
}
for (SystemApplet *sa : inkhud->systemApplets) {
for (Applet *sa : inkhud->systemApplets) {
// Note: no onDeactivate. System applets are always active.
sa->onReboot();
sa->onShutdown();
}
inkhud->persistence->saveSettings();
inkhud->persistence->saveLatestMessage();
// Note: no forceUpdate call here
// We don't have any final screen to draw, although LogoApplet::onReboot did already display a "rebooting" screen
// Because OSThread will not be given another chance to run before reboot, this means that no display update will occur
return 0; // No special status to report. Ignored anyway by this Observable
}

View File

@ -26,8 +26,6 @@ class SystemApplet : public Applet
bool lockRendering = false; // - prevent other applets from being rendered during an update
bool lockRequests = false; // - prevent other applets from triggering display updates
virtual void onReboot() { onShutdown(); } // - handle reboot specially
// Other system applets may take precedence over our own system applet though
// The order an applet is passed to WindowManager::addSystemApplet determines this hierarchy (added earlier = higher rank)