diff options
| author | JustScott <development@justscott.me> | 2024-12-19 00:45:05 -0600 |
|---|---|---|
| committer | mark9064 <30447455+mark9064@users.noreply.github.com> | 2025-12-31 18:21:16 +0000 |
| commit | edd67caa7b182c98db8a75fa9fa13a3c8d59cfdc (patch) | |
| tree | c6f5c6e7b795be87baaea4f29ddb2a128a7fb237 /src/displayapp/screens/WatchFaceTerminal.h | |
| parent | 41050e6a9851eddb5735b7888e3e48d94604daed (diff) | |
Add weather to the terminal watchface
Diffstat (limited to 'src/displayapp/screens/WatchFaceTerminal.h')
| -rw-r--r-- | src/displayapp/screens/WatchFaceTerminal.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/displayapp/screens/WatchFaceTerminal.h b/src/displayapp/screens/WatchFaceTerminal.h index bf460866..be425e7a 100644 --- a/src/displayapp/screens/WatchFaceTerminal.h +++ b/src/displayapp/screens/WatchFaceTerminal.h @@ -7,6 +7,7 @@ #include <displayapp/Controllers.h> #include "displayapp/screens/Screen.h" #include "components/datetime/DateTimeController.h" +#include "components/ble/SimpleWeatherService.h" #include "utility/DirtyValue.h" namespace Pinetime { @@ -30,7 +31,8 @@ namespace Pinetime { Controllers::NotificationManager& notificationManager, Controllers::Settings& settingsController, Controllers::HeartRateController& heartRateController, - Controllers::MotionController& motionController); + Controllers::MotionController& motionController, + Controllers::SimpleWeatherService& weatherService); ~WatchFaceTerminal() override; void Refresh() override; @@ -46,6 +48,7 @@ namespace Pinetime { Utility::DirtyValue<bool> heartbeatRunning {}; Utility::DirtyValue<bool> notificationState {}; Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::days>> currentDate; + Utility::DirtyValue<std::optional<Controllers::SimpleWeatherService::CurrentWeather>> currentWeather {}; lv_obj_t* label_time; lv_obj_t* label_date; @@ -56,6 +59,7 @@ namespace Pinetime { lv_obj_t* stepValue; lv_obj_t* notificationIcon; lv_obj_t* connectState; + lv_obj_t* weather; Controllers::DateTime& dateTimeController; const Controllers::Battery& batteryController; @@ -64,6 +68,7 @@ namespace Pinetime { Controllers::Settings& settingsController; Controllers::HeartRateController& heartRateController; Controllers::MotionController& motionController; + Controllers::SimpleWeatherService& weatherService; lv_task_t* taskRefresh; }; @@ -81,7 +86,8 @@ namespace Pinetime { controllers.notificationManager, controllers.settingsController, controllers.heartRateController, - controllers.motionController); + controllers.motionController, + *controllers.weatherController); }; static bool IsAvailable(Pinetime::Controllers::FS& /*filesystem*/) { |
