Re-add periodic refresh on topbar and layout

This commit is contained in:
Raphael Coeffic
2021-04-18 07:57:42 +02:00
parent 1bce228910
commit 19cab41034
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -198,11 +198,11 @@ void Layout::checkEvents()
LayoutBase::checkEvents();
decorate();
// uint32_t now = RTOS_GET_MS();
// if (now - lastRefresh >= LAYOUT_REFRESH) {
// lastRefresh = now;
// invalidate();
// }
uint32_t now = RTOS_GET_MS();
if (now - lastRefresh >= LAYOUT_REFRESH) {
lastRefresh = now;
invalidate();
}
}
void Layout::decorate()
+5 -5
View File
@@ -165,9 +165,9 @@ void TopBar::paint(BitmapBuffer * dc)
void TopBar::checkEvents()
{
// uint32_t now = RTOS_GET_MS();
// if (now - lastRefresh >= TOPBAR_REFRESH) {
// lastRefresh = now;
// invalidate();
// }
uint32_t now = RTOS_GET_MS();
if (now - lastRefresh >= TOPBAR_REFRESH) {
lastRefresh = now;
invalidate();
}
}