implement dashboard on wake
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
#pragma once
|
||||
#include <TFT_eSPI.h>
|
||||
#include "ScreenData.h"
|
||||
#include "Dashboard.h"
|
||||
|
||||
class DisplayManager {
|
||||
public:
|
||||
DisplayManager();
|
||||
void begin();
|
||||
void render(const ScreenState& state);
|
||||
void setBacklight(bool on);
|
||||
TouchEvent readTouch();
|
||||
|
||||
// Dashboard tile touch — returns TileID or -1
|
||||
int dashboardTouch(uint16_t x, uint16_t y);
|
||||
|
||||
private:
|
||||
TFT_eSPI _tft;
|
||||
ScreenID _lastScreen = ScreenID::BOOT_SPLASH;
|
||||
bool _needsFullRedraw = true;
|
||||
bool _lastBlink = false;
|
||||
TFT_eSPI _tft;
|
||||
Dashboard _dash;
|
||||
|
||||
ScreenID _lastScreen = ScreenID::BOOT_SPLASH;
|
||||
bool _needsFullRedraw = true;
|
||||
bool _lastBlink = false;
|
||||
bool _dashSpriteReady = false;
|
||||
unsigned long _lastDashRefresh = 0;
|
||||
|
||||
// Colors
|
||||
static constexpr uint16_t COL_NEON_TEAL = 0x07D7;
|
||||
@@ -33,6 +42,7 @@ private:
|
||||
void drawWifiFailed();
|
||||
void drawAlertScreen(const ScreenState& s);
|
||||
void drawStatusScreen(const ScreenState& s);
|
||||
void drawDashboard(const ScreenState& s);
|
||||
|
||||
// Helpers
|
||||
void drawCentered(const char* txt, int y, int sz, uint16_t col);
|
||||
|
||||
Reference in New Issue
Block a user