feat(examples): add Weather SDL2 app (Open-Meteo)#8
Open
lahirunirmalx wants to merge 3 commits into
Open
Conversation
Port of the Phoebe LVGL app_weather to a standalone 320x170 SDL2 program. Fetches current conditions from the keyless Open-Meteo API on a background libcurl thread, parses the small flat JSON by hand (no JSON lib), and draws a procedurally animated icon (breathing sun / cloud / falling rain) chosen by WMO weather code. Code->category/text tables from Phoebe ui_common.h. Config via env: WEATHER_LAT, WEATHER_LON, WEATHER_CITY (default Colombo). Keys: ESC / Q quit.
Press L (or M) in the weather view to open a keyboard-navigable list of preset cities (Colombo, London, New York, ... 15 total). Arrows move, ENTER selects, ESC cancels. Selecting a city updates the location under a mutex and signals the fetch thread to refetch immediately (shows 'fetching...' then the new city's conditions). WEATHER_LAT/LON/CITY env still seed the initial location. Top-left 'L:loc' hint advertises the picker. Verified in the emulator: picker lists cities, selecting London refetches and renders London weather live.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of the Phoebe LVGL app_weather to a standalone 320x170 SDL2 program. Fetches current conditions from the keyless Open-Meteo API on a background libcurl thread, parses the small flat JSON by hand (no JSON lib), and draws a procedurally animated icon (breathing sun / cloud / falling rain) chosen by WMO weather code. Code->category/text tables from Phoebe ui_common.h.
Config via env: WEATHER_LAT, WEATHER_LON, WEATHER_CITY (default Colombo).
Keys: ESC / Q quit.