From f88c69a31aadb0fdfe6555db626ba8f05e756272 Mon Sep 17 00:00:00 2001 From: Victor Kareh Date: Mon, 5 Jan 2026 07:12:08 -0500 Subject: SimpleWeatherService: Add sunrise and sunset data (#2100) * SimpleWeatherService: Add sunrise and sunset data --------- Co-authored-by: mark9064 <30447455+mark9064@users.noreply.github.com> --- src/components/ble/SimpleWeatherService.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/components/ble/SimpleWeatherService.h') diff --git a/src/components/ble/SimpleWeatherService.h b/src/components/ble/SimpleWeatherService.h index 4d09d662..96933b85 100644 --- a/src/components/ble/SimpleWeatherService.h +++ b/src/components/ble/SimpleWeatherService.h @@ -113,13 +113,17 @@ namespace Pinetime { Temperature minTemperature, Temperature maxTemperature, Icons iconId, - Location&& location) + Location&& location, + int16_t sunrise, + int16_t sunset) : timestamp {timestamp}, temperature {temperature}, minTemperature {minTemperature}, maxTemperature {maxTemperature}, iconId {iconId}, - location {std::move(location)} { + location {std::move(location)}, + sunrise {sunrise}, + sunset {sunset} { } uint64_t timestamp; @@ -128,6 +132,8 @@ namespace Pinetime { Temperature maxTemperature; Icons iconId; Location location; + int16_t sunrise; + int16_t sunset; bool operator==(const CurrentWeather& other) const; }; @@ -152,6 +158,8 @@ namespace Pinetime { std::optional Current() const; std::optional GetForecast() const; + [[nodiscard]] bool IsNight() const; + private: // 00050000-78fc-48fe-8e23-433b3a1942d0 static constexpr ble_uuid128_t BaseUuid() { -- cgit v1.2.3-70-g09d2