some fixes; added chkweather

This commit is contained in:
2026-05-13 13:41:36 +03:00
parent 9e05bdd807
commit a31d809c2e
5 changed files with 61 additions and 16 deletions

View File

@@ -7,10 +7,10 @@
#define SEM_NAME "/weather_sem"
typedef enum {
WEATHER_GOOD = 0, // may start observations
WEATHER_BAD = 1, // cannot start but can continue if want
WEATHER_TERRIBLE = 2, // close & park: wind, precipitation, humidity etc.
WEATHER_PROHIBITED = 3, // force closing & parking; power off equipment, ready to power off computer
WEATHER_GOOD = 0, // may start observations
WEATHER_BAD = 1, // cannot start but can continue if want
WEATHER_TERRIBLE = 2, // close & park: wind, precipitation, humidity etc.
WEATHER_PROHIBITED = 3, // force closing & parking; power off equipment, ready to power off computer
} weather_condition_t;
typedef struct {
@@ -22,7 +22,7 @@ typedef struct {
float pressure; // atm. pressure, mmHg: "PRESSURE"
float humidity; // humidity, percents: "HUMIDITY"
int rain; // ==1 when rainy: "PRECIP"
int prohibited; // ==1 if "weather == prohibited" or got `prohibited` signal -> ready to power off
int forceoff; // force power off (AC power lost or lightning)
time_t last_update; // value of "TMEAS"
} weather_data_t;