Skip to content

Feature/wind speed graph#80

Open
cdlenfert wants to merge 2 commits intomattrossman:mainfrom
cdlenfert:feature/wind-speed-graph
Open

Feature/wind speed graph#80
cdlenfert wants to merge 2 commits intomattrossman:mainfrom
cdlenfert:feature/wind-speed-graph

Conversation

@cdlenfert
Copy link
Copy Markdown

@cdlenfert cdlenfert commented Feb 20, 2026

Summary

Utilized Claude Sonnet 4.5/6 to develop and test this feature.

Adds a wind speed overlay line to the forecast graph, fetched alongside temperature and precipitation data. Wind speed is shown as a yellow line (or white on B&W) scaled independently from temperature, making it easy to spot gusty windows at a glance.

Changes

Weather data

  • Weather providers (openweathermap.js, wunderground.js) now include hourly wind speed in the forecast payload alongside temp/precip
  • Wind data is sent to the watch as WIND_TREND_UINT8 and stored in flash via persist_set_wind_trend()

Watchface rendering

  • forecast_layer.c draws a wind speed line overlaid on the existing temp/precip graph
  • Color: yellow on color watches, white (1px) on B&W — visually distinct from the red temp line (3px) and blue precip fill

Settings (3 new options in the Weather section)

  • Wind Units — mph or kph
  • Fixed wind graph max — Auto (scales to data) or a fixed cap (5–40) for consistent day-to-day scale
  • Show wind speed graph — toggle to hide/show the wind line (on by default)

Upgrade safety

  • UUID and displayName are unchanged from main
  • ConfigV1 migration in config.c handles upgrading from existing main installs without crashing — field-by-field remapping from the old 17-byte layout to the new 22-byte layout, with sane defaults for new fields

Testing

  • Builds cleanly for aplite, basalt, diorite
  • Fresh install works
  • Install over existing main build works (no crash)
  • B&W (aplite/diorite): wind line visible as 1px white line
  • Color (basalt): wind line visible as yellow
  • Toggle off in settings → wind line disappears
  • Fixed max set → line scale stays constant across reloads
  • kph unit selected → values display correctly
  • Works with both OpenWeatherMap and Weather Underground providers
  • Rebased on 1.30 upstream main branch

@cdlenfert cdlenfert force-pushed the feature/wind-speed-graph branch from c320c63 to 44659df Compare March 30, 2026 22:35
@cdlenfert
Copy link
Copy Markdown
Author

This branch is now rebased on v1.30.0 (from upstream). @mattrossman Please let me know if you are interested in testing or adding this feature. I find it very handy tracking how windy it will get at different times of day.

@mattrossman
Copy link
Copy Markdown
Owner

Hey, thanks for the contribution! Do you have screenshots of how this looks in practice? I'm curious when using fixed cap mode, what happens when values exceed that range, and how easy it is to interpret the wind amplitude amongst the other lines. At least for precipitation change it's a 0-100 value so the Y axis labels aren't really needed.

I should note, lately I've started bumping up against the memory limits of the aplite platform with hard to debug crashes, which has made me think twice about what rendering features I introduce. It might be a while before I make enough headway optimizing the aplite memory budget to consider adding community stuff. I'm also trying to get precipitation amount #115 out in the near future.

@cdlenfert
Copy link
Copy Markdown
Author

bw-composite color-composite
  • Fixed cap mode is almost a requirement as far as I'm concerned. I would consider removing "auto" mode entirely because unless you know the max speed in the forecast, you'll have no gauge for relative speeds at different times.
  • When in fixed cap mode, when the wind speed (e.g. 30mph) exceeds the cap you set (20mph), the wind line sticks to the top of the graph. Once you know your cap it's easy to tell the relative windspeed.
  • The thin yellow line stands out well on Basalt. Aplite is less stand out (especially when wind hugs the temp curve), but it works well enough I think.
  • I'm running the latest build (1.30 + wind graph) on Aplite without exhausting memory (so far) - screenshot above is from the pebble classic I'm wearing today

If you like the concept overall, I'm happy to implement any changes you might want to see. The upcoming precipitation totals feature looks great (wish we could get some rain here in CO to test it with).

@cdlenfert
Copy link
Copy Markdown
Author

Today while running the watchface on aplite (pebble classic) I did notice some memory resource issues. For example if I received a notification, dismissed it, then was returned to the watchface, it either was a blank screen or might have some elements missing. I hadn't noticed this on the initial wind graph implementation I did on top of v1.24, so I'm guessing it's the combination with the latest v1.30 updates that's exceeding the memory limits.

@mattrossman
Copy link
Copy Markdown
Owner

I'm making headway on freeing up some memory budget in #122! The calendar text was the main inefficiency from what I can tell, I guess recent features like night shading may have inched closer to the ceiling.

Thanks for the screenshots, I like how the yellow line looks on Basalt more than I thought I would, fingers crossed I end up with enough memory budget to fit this in!

Another weather feature on my wishlist is cloud coverage, which I want to render like a bar of "clouds" on the top of the weather graph (thickness corresponding to coverage amount). It takes some creativity to present several different trend values within one small region with different units and purposes. There's an endless amount of potential trend values people might want to display like UV exposure, humidity, air quality, etc. and only so much screen real estate. Point being, down the road I'm considering expanding that yellow line concept into a broader system for customizing a secondary trend value of the user's choice to be useful for more than just wind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants