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>
17 lines
600 B
C
17 lines
600 B
C
#pragma once
|
|
#include <Arduino.h>
|
|
|
|
enum Trend { TREND_FALLING = -1, TREND_STEADY = 0, TREND_RISING = 1 };
|
|
enum WxCategory { WX_FINE, WX_FAIR, WX_CHANGEABLE, WX_RAIN, WX_STORM, WX_UNKNOWN };
|
|
|
|
struct Forecast {
|
|
char letter; // 'A'..'Z'
|
|
const char* text; // full Zambretti phrase
|
|
WxCategory category; // for display icon + short label
|
|
};
|
|
|
|
Trend classifyTrend(float deltaHpa3h);
|
|
Forecast computeForecast(float mslHpa, Trend trend, int month);
|
|
const char* categoryShort(WxCategory c);
|
|
const char* forecastTextForLetter(char letter); // full Zambretti phrase for 'A'..'Z'
|