diff options
| author | kieranc <kieranc@gmail.com> | 2023-06-04 16:52:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-04 16:52:31 +0200 |
| commit | 94f41258d52102dc4863d964d43794b34f26cf41 (patch) | |
| tree | b4ca7ee44ea2531ca326487966c7a1b1c2b4ebe5 /src/displayapp/screens/WatchFacePineTimeStyle.h | |
| parent | 394f58fbb246a3b54a409bf94d85aa7d63b88a2c (diff) | |
PineTimeStyle weather display (#1459)
Weather display for PineTimeStyle
Documentation : https://wiki.pine64.org/wiki/PineTimeStyle and https://wiki.pine64.org/wiki/Infinitime-Weather
Diffstat (limited to 'src/displayapp/screens/WatchFacePineTimeStyle.h')
| -rw-r--r-- | src/displayapp/screens/WatchFacePineTimeStyle.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.h b/src/displayapp/screens/WatchFacePineTimeStyle.h index a5c06901..e157bb2c 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.h +++ b/src/displayapp/screens/WatchFacePineTimeStyle.h @@ -8,6 +8,7 @@ #include "displayapp/screens/BatteryIcon.h" #include "displayapp/Colors.h" #include "components/datetime/DateTimeController.h" +#include "components/ble/weather/WeatherService.h" #include "components/ble/BleController.h" #include "utility/DirtyValue.h" @@ -30,7 +31,8 @@ namespace Pinetime { const Controllers::Ble& bleController, Controllers::NotificationManager& notificationManager, Controllers::Settings& settingsController, - Controllers::MotionController& motionController); + Controllers::MotionController& motionController, + Controllers::WeatherService& weather); ~WatchFacePineTimeStyle() override; bool OnTouchEvent(TouchEvents event) override; @@ -58,6 +60,9 @@ namespace Pinetime { Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {}; Utility::DirtyValue<uint32_t> stepCount {}; Utility::DirtyValue<bool> notificationState {}; + Utility::DirtyValue<int16_t> nowTemp {}; + int16_t clouds = 0; + int16_t precip = 0; static Pinetime::Controllers::Settings::Colors GetNext(Controllers::Settings::Colors color); static Pinetime::Controllers::Settings::Colors GetPrevious(Controllers::Settings::Colors color); @@ -72,6 +77,7 @@ namespace Pinetime { lv_obj_t* btnRandom; lv_obj_t* btnClose; lv_obj_t* btnSteps; + lv_obj_t* btnWeather; lv_obj_t* timebar; lv_obj_t* sidebar; lv_obj_t* timeDD1; @@ -81,6 +87,8 @@ namespace Pinetime { lv_obj_t* dateDayOfWeek; lv_obj_t* dateDay; lv_obj_t* dateMonth; + lv_obj_t* weatherIcon; + lv_obj_t* temperature; lv_obj_t* plugIcon; lv_obj_t* bleIcon; lv_obj_t* calendarOuter; @@ -93,8 +101,6 @@ namespace Pinetime { lv_obj_t* stepGauge; lv_obj_t* btnSetColor; lv_obj_t* btnSetOpts; - lv_obj_t* lbl_btnSetColor; - lv_obj_t* lbl_btnSetOpts; lv_obj_t* stepIcon; lv_obj_t* stepValue; lv_color_t needle_colors[1]; @@ -107,10 +113,10 @@ namespace Pinetime { Controllers::NotificationManager& notificationManager; Controllers::Settings& settingsController; Controllers::MotionController& motionController; + Controllers::WeatherService& weatherService; void SetBatteryIcon(); void CloseMenu(); - void AlignIcons(); lv_task_t* taskRefresh; }; |
