One weather message off the phone, and the reading it leaves behind. More...
Go to the source code of this file.
Data Structures | |
| struct | WeatherMessage |
| One weather message as the transport read it, before anything is kept. More... | |
| struct | WeatherState |
| The weather a store keeps, laid out as the blob it saves to flash. More... | |
| struct | WeatherClock |
| The watch's clock at the moment a message lands, broken apart. More... | |
Functions | |
| bool | weather_reading_apply (WeatherState *state, const WeatherMessage *msg, const WeatherClock *clock) |
| Put a message's readings into the kept weather. | |
| void | weather_reading_convert (WeatherState *state, bool to_fahrenheit) |
| Convert every temperature in the kept weather to the other unit. | |
One weather message off the phone, and the reading it leaves behind.
The phone sends weather as one message whose keys come in groups: the current temperature and sky, the extras (humidity, wind, sun times), today's forecast, the air readings, and the two packed strips. A face declares only the groups it shows, and the phone leaves out any value it has none for. Everything that turns that message into the kept reading lives here, off the SDK, so the rules for a group that arrives half filled can be tested on the host.