1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-24 19:06:53 +01:00
Gadgetbridge/app
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
..
src Nothing CMF Watch Pro: Add weather support 2024-03-25 22:45:36 +00:00
build.gradle update changelogs, bump version 2024-03-25 09:46:40 +01:00
lint-baseline.xml Update linter baseline 2024-02-19 12:14:36 +01:00
proguard-rules.pro Add lint baseline, enable linting on CI, fix some reported errors (#3291) 2023-09-11 09:17:04 +00:00