consolidate sketches

This commit is contained in:
2026-02-16 17:53:06 -08:00
parent 75c3f5706b
commit 838afaa36f
42 changed files with 5655 additions and 817 deletions

58
ScreenData.h Normal file
View File

@@ -0,0 +1,58 @@
#pragma once
#include <Arduino.h>
enum class DeviceState : uint8_t {
SILENT,
ALERTING,
WAKE
};
enum class ScreenID : uint8_t {
BOOT_SPLASH,
WIFI_CONNECTING,
WIFI_CONNECTED,
WIFI_FAILED,
ALERT,
STATUS,
DASHBOARD,
OFF
};
#define ALERT_HISTORY_SIZE 3
struct AlertRecord {
char message[64] = "";
char timestamp[12] = "";
};
struct ScreenState {
ScreenID screen = ScreenID::BOOT_SPLASH;
DeviceState deviceState = DeviceState::SILENT;
bool blinkPhase = false;
char alertMessage[64] = "";
bool wifiConnected = false;
char wifiSSID[33] = "";
int wifiRSSI = 0;
char wifiIP[16] = "";
bool ntpSynced = false;
char timeString[12] = "";
uint32_t uptimeMinutes = 0;
uint32_t freeHeapKB = 0;
bool networkOK = false;
bool debugMode = false;
AlertRecord alertHistory[ALERT_HISTORY_SIZE] = {};
int alertHistoryCount = 0;
};
struct TouchEvent {
bool pressed = false;
uint16_t x = 0;
uint16_t y = 0;
};