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:
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
#include "forecast.h"
|
||||
|
||||
struct FcastEntry {
|
||||
uint32_t epoch;
|
||||
char letter; // Zambretti 'A'..'Z'
|
||||
uint8_t cat; // WxCategory
|
||||
};
|
||||
|
||||
void flogBegin();
|
||||
void flogConsider(uint32_t epoch, const Forecast& f); // logs only when it changes
|
||||
int flogCount();
|
||||
FcastEntry flogGet(int i); // 0 = oldest
|
||||
bool flogSave();
|
||||
bool flogLoad();
|
||||
Reference in New Issue
Block a user