1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-19 11:30:44 +02:00
Gadgetbridge/app/src
g_p 7cb7c0ea8a Nothing CMF Watch Pro: Add weather support
This patch adds support for current weather, and next 6 days' weather. Condition mapping added to align with the available icons on the watch.
It also transmits the hourly condition and temperature for the coming 24 hours as part of the update.

Tested on CMF Nothing Watch Pro firmware 11.0.0.50 with weather data cooming from Breezy Weather (using Accuweather)

For current day:
- Weather symbol shows
- Name of current location shows (long names scroll)
- Current temperature shows
- Written condition shows (e.g. "Cloudy")
- Min/max temperatures show
- Air quality indicator shows

For upcoming days:
- Weather symbol shows
- Min/max temperatures show
- Name of day shows (patch doesn't touch this)

Nothing CMF Watch Pro: Use putShort() for air quality indicator; fix max location length

- Using putShort() as suggested from code review - tested to give same result
- Reduced max location length to 16 bytes, as 32 was not working

Nothing CMF Watch Pro: Better handle limited data from weather providers

- Check max length of daily and hourly datasets
- Populate with dummy data if insufficient data available
- Use null as the weather condition in any situation where no data available

Nothing CMF Watch Pro: If hourly weather data is missing, use current data

This should create a better fallback behaviour if a weather source is lacking hour-by-hour data.
Assuming the current data will apply in the next hour is less messy than showing placeholder (inaccurate) figures.

Nothing CMF Watch Pro: Allow location names of up to 30 characters, improve string processing
2024-03-25 22:45:36 +00:00
..
banglejs Move build variant-specific strings from build.gradle to separate resource files 2024-02-18 20:52:53 +00:00
banglejsNightly/res/values Move build variant-specific strings from build.gradle to separate resource files 2024-02-18 20:52:53 +00:00
main Nothing CMF Watch Pro: Add weather support 2024-03-25 22:45:36 +00:00
mainline/res/values Move build variant-specific strings from build.gradle to separate resource files 2024-02-18 20:52:53 +00:00
nightly/res Add missing ic_launcher drawables in nightly 2024-02-18 20:52:53 +00:00
nopebble/res Move build variant-specific strings from build.gradle to separate resource files 2024-02-18 20:52:53 +00:00
test Sony Headphones: Merge V3 protocol into V2 2024-03-15 22:56:11 +00:00