snapshot
This commit is contained in:
@@ -3,13 +3,17 @@
|
||||
#include "ScreenData.h"
|
||||
#include "Dashboard.h"
|
||||
|
||||
// Hold gesture result
|
||||
struct HoldState {
|
||||
bool active = false;
|
||||
bool completed = false;
|
||||
uint16_t x = 0;
|
||||
uint16_t y = 0;
|
||||
bool active = false; // finger currently down
|
||||
bool charged = false; // hold duration met, waiting for release
|
||||
bool completed = false; // finger RELEASED after being charged → act now
|
||||
bool cancelled = false; // finger released before charge completed
|
||||
uint16_t x = 0;
|
||||
uint16_t y = 0;
|
||||
unsigned long holdMs = 0;
|
||||
unsigned long targetMs = 0;
|
||||
float progress = 0.0f; // 0.0 to 1.0
|
||||
};
|
||||
|
||||
class DisplayManager {
|
||||
@@ -35,7 +39,9 @@ private:
|
||||
|
||||
// Hold tracking
|
||||
bool _holdActive = false;
|
||||
bool _holdCharged = false; // bar is full, waiting for release
|
||||
unsigned long _holdStartMs = 0;
|
||||
unsigned long _holdChargeMs = 0; // when charge completed
|
||||
uint16_t _holdX = 0;
|
||||
uint16_t _holdY = 0;
|
||||
float _holdProgress = 0.0f;
|
||||
@@ -59,7 +65,7 @@ private:
|
||||
void drawAlertScreen(const ScreenState& s);
|
||||
void drawStatusScreen(const ScreenState& s);
|
||||
void drawDashboard(const ScreenState& s);
|
||||
void drawSilenceProgress(float progress);
|
||||
void drawSilenceProgress(float progress, bool charged);
|
||||
|
||||
// Helpers
|
||||
void drawCentered(const char* txt, int y, int sz, uint16_t col);
|
||||
|
||||
Reference in New Issue
Block a user