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:
@@ -88,6 +88,11 @@ Forecast computeForecast(float p, Trend trend, int month) {
|
||||
return Forecast{ letter, ZTEXT[letter - 'A'], categoryOf(letter) };
|
||||
}
|
||||
|
||||
const char* forecastTextForLetter(char letter) {
|
||||
if (letter < 'A' || letter > 'Z') return "";
|
||||
return ZTEXT[letter - 'A'];
|
||||
}
|
||||
|
||||
const char* categoryShort(WxCategory c) {
|
||||
switch (c) {
|
||||
case WX_FINE: return "Fine";
|
||||
|
||||
Reference in New Issue
Block a user