v0.0.2: WYSIWYG settings + coloured weather icons - #3
Merged
Conversation
The config page sent only keys that differed from a phone-side baseline. That baseline (localStorage) is not authoritative — it drifts from the watch on reinstall, a different phone, or when JS defaults never matched the firmware — so a value shown in the page but left untouched was silently never applied (e.g. a complication reading "Location" yet staying "Date" on the watch). Always send every non-translation setting so the watch matches the page (the C inbox handler already applies only the keys present, keeping this idempotent). Translation strings stay delta-only to fit the 1280-byte inbox; the language picker resends them when it changes them. Also align the JS slot/threshold defaults (style_week, style_am_pm, low-battery) to the firmware so a fresh install shows the real out-of-box state before the first save.
weather_glyph_color() maps each Climacons condition glyph to a meaningful colour (sun amber, rain/snow blue, lightning amber, moon pale yellow) on PBL_COLOR watches outside the Mono theme; the temperature keeps the theme colour. Black-and-white platforms (diorite, flint) and the Mono theme are unchanged. All colours are stock SDK GColor values.
WYSIWYG settings fix and colour weather icons; see CHANGELOG.md.
A Weather > Icon style selector lets colour-watch owners choose:
- Default: colour where the platform supports it, B&W otherwise (and it
follows the Mono theme's monochrome look);
- Colour: force the tinted icons, overriding the Mono theme;
- Black & White: force the classic monochrome glyph on colour watches too.
Stored as adv_settings.weather_icons (appended at the struct end so existing
persisted blobs keep the Default via the static initializer). weather_glyph_color
honours it; the config handler redraws the weather on change.
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.
Summary
localStorage), which is not authoritative and drifts from the watch (reinstall, a different phone, or JS defaults that never matched the firmware). A value shown in the page but left untouched was silently never applied — e.g. a complication reading "Location" in the settings yet staying "Date" on the watch. Every non-translation setting is now always sent (the C inbox handler already applies only the keys present, so this stays idempotent). Translation strings stay delta-only to fit the watch's 1280-byte inbox; the language picker resends them when it changes them.Compatibility
adv_settings.weather_iconsis appended at the end of the persisted struct, so existing saved blobs keep the Default value via the static initializer — no reset, fully backward compatible (persist_read_datatolerates a shorter stored blob).Test plan
Verified inside
nix develop:tools/test.sh).pebble buildcompletes for basalt, diorite, emery, flint.-Werrorflag set on all four platforms (zero warnings) — bothPBL_COLORandPBL_BWpaths.node: the "ghost setting" scenario is fixed; payload stays under the 1280-byte inbox (~835 B common case, ~831 B AppMessage on a full language switch); the new Icon style field renders with Default selected and is included in the always-send set.