The forecast strips as the phone packs them, and the readers that unpack them. More...
Go to the source code of this file.
Data Structures | |
| struct | WeatherHourCol |
| One hourly forecast column: a sky code plus a temperature (WEATHER_NO_TEMP for none). More... | |
| struct | WeatherDayCol |
| One daily forecast column: a sky code plus the day's high and low. More... | |
| struct | WeatherHourly |
| The hourly strip. count is 0 until a reading lands. More... | |
| struct | WeatherDaily |
| The 7-day strip. count is 0 until a reading lands. More... | |
Functions | |
| bool | weather_hourly_decode (const uint8_t *buf, uint16_t len, WeatherHourly *out) |
| Unpacks an hourly forecast off the wire. | |
| bool | weather_daily_decode (const uint8_t *buf, uint16_t len, WeatherDaily *out) |
| Unpacks a 7-day forecast off the wire. | |
The forecast strips as the phone packs them, and the readers that unpack them.
Both strips are a short header then a run of fixed-width columns, so unlike the agenda and the watchlist the whole length is known before any of it is read. That makes one check up front enough, where those two have to check at every step, and it is why these two fill the caller's strip as they go rather than handing over a finished copy.
The packer on the other side is ts/pkjs/wire.ts, and the two have to agree exactly.