some fixes

This commit is contained in:
2026-04-10 14:51:40 +03:00
parent 987cf022fe
commit af33a036c8
6 changed files with 92 additions and 48 deletions

View File

@@ -5,21 +5,22 @@
typedef enum {
WEATHER_GOOD = 0,
WEATHER_BAD = 1,
WEATHER_TERRIBLE = 2
WEATHER_BAD = 1,
WEATHER_TERRIBLE = 2,
WEATHER_PROHIBITED = 3,
} weather_condition_t;
typedef struct {
weather_condition_t weather;
float windmax;
int rain;
float clouds;
float wind;
float exttemp;
float pressure;
float humidity;
int prohibited;
double last_update;
weather_condition_t weather; // conditions: field "WEATHER"
float windmax; // maximal wind for last hour, m/s: "WINDMAX1"
float wind; // current wind speed, m/s: "WIND"
float clouds; // sky "quality" (>2500 - OK): "CLOUDS"
float exttemp; // external temperature, degC: "EXTTEMP"
float pressure; // atm. pressure, mmHg: "PRESSURE"
float humidity; // humidity, percents: "HUMIDITY"
int rain; // ==1 when rainy: "PRECIP"
int prohibited; // ==1 if "weather == prohibited" or rain == 1
time_t last_update; // value of "TMEAS"
} weather_data_t;
int get_weather_data(weather_data_t *data);