Loading...
Searching...
No Matches
WeatherState Struct Reference

The weather a store keeps, laid out as the blob it saves to flash. More...

#include <weather_reading.h>

Data Fields

uint8_t tag
 The store's tag, so a restore can tell this blob from another shape.
int16_t temp
 Current temperature in the user's unit (WEATHER_NO_TEMP when none).
char cond [32]
 Short word for the sky, such as "SUNNY".
char cond_label [20]
 The sky in words, such as "Partly Cloudy", empty when the phone sent none.
int humidity
 Percent humidity, -1 when none.
int wind_kmh
 Wind speed in km/h, -1 when none.
char wind_dir [4]
 Wind direction like "NW".
int16_t sunrise
 Sunrise as minutes past local midnight, -1 when none.
int16_t sunset
 Sunset as minutes past local midnight, -1 when none.
int uv
 UV index (-1 when none).
int temp_max
 Today's high (WEATHER_NO_TEMP when none).
int temp_min
 Today's low (WEATHER_NO_TEMP when none).
int precip_chance
 Percent chance of precip (-1 when none).
int feels_like
 Apparent temperature (WEATHER_NO_TEMP when none).
int pressure
 Sea level pressure in hPa (-1 when none).
int dew_point
 Dew point temperature (WEATHER_NO_TEMP when none).
time_t forecast_day
 Local midnight of the day the high, low, UV, and rain chance came, or 0.
WeatherHourly hourly
 The hourly forecast strip (count 0 when none).
time_t hourly_first
 When the hourly strip's first column starts, or 0 when none came.
time_t daily_first
 Local midnight of the daily strip's first day, or 0 when none came.
WeatherDaily daily
 The 7-day forecast strip (count 0 when none).
time_t last_sync
 When the last reading landed, or 0 for never.

Detailed Description

The weather a store keeps, laid out as the blob it saves to flash.

The order and the types are the saved format, so a relaunch after an update reads what the last version wrote. Changing either needs a new store tag.


The documentation for this struct was generated from the following file: