diff options
| author | Victor Kareh <vkareh@redhat.com> | 2026-01-05 07:12:08 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-05 13:12:08 +0100 |
| commit | f88c69a31aadb0fdfe6555db626ba8f05e756272 (patch) | |
| tree | f173289f96c89a38afc5198a6b61e192cf372118 /src/components/ble/SimpleWeatherService.h | |
| parent | 51a6fb6a7ed7a410bb141966a43a7649d10bbdfc (diff) | |
SimpleWeatherService: Add sunrise and sunset data (#2100)
* SimpleWeatherService: Add sunrise and sunset data
---------
Co-authored-by: mark9064 <30447455+mark9064@users.noreply.github.com>
Diffstat (limited to 'src/components/ble/SimpleWeatherService.h')
| -rw-r--r-- | src/components/ble/SimpleWeatherService.h | 12 |
1 files changed, 10 insertions, 2 deletions
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<CurrentWeather> Current() const; std::optional<Forecast> GetForecast() const; + [[nodiscard]] bool IsNight() const; + private: // 00050000-78fc-48fe-8e23-433b3a1942d0 static constexpr ble_uuid128_t BaseUuid() { |
