feat: forecast change log

Record each forecast change (Zambretti letter transition) with a
timestamp into a 24-entry ring buffer, persisted to LittleFS and
restored on boot. New /api/forecasts endpoint and a 'Forecast log'
panel in the web UI (newest first, category colour, timestamp).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 22:40:28 +07:00
co-authored by Claude Opus 4.8
parent f4a9a04207
commit f1fe0b728f
8 changed files with 157 additions and 0 deletions
+3
View File
@@ -23,6 +23,9 @@ static const unsigned long FLUSH_INTERVAL_MS = 15UL * 60UL * 1000UL; // flush
static const int HISTORY_SIZE = 288; // 24 h @ 5 min
static const float TREND_THRESHOLD_HPA = 1.6f; // >|1.6| hPa / 3 h = rising/falling
// ---- Forecast change log ----
static const int FORECAST_LOG_SIZE = 24; // last N forecast changes
// ---- Defaults (editable via web) ----
static const float DEFAULT_ALTITUDE_M = 150.0f;
static const int DEFAULT_TZ_OFFSET_MIN = 7 * 60; // UTC+7