From c94a59e7d3e0f9929171263412033a56872c168a Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sat, 9 Dec 2023 20:39:08 +0100 Subject: SimpleWeather service : new weather implementation This new implementation of the weather feature provides a new BLE API and a new weather service. The API uses a single characteristic that allows companion apps to write the weather conditions (current and forecast for the next 5 days). The SimpleWeather service exposes those data as std::optional fields. This new implementation replaces the previous WeahterService. The API is documented in docs/SimpleWeatherService.md. --- src/displayapp/screens/WatchFacePineTimeStyle.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/displayapp/screens/WatchFacePineTimeStyle.h') diff --git a/src/displayapp/screens/WatchFacePineTimeStyle.h b/src/displayapp/screens/WatchFacePineTimeStyle.h index dd079fed..72537095 100644 --- a/src/displayapp/screens/WatchFacePineTimeStyle.h +++ b/src/displayapp/screens/WatchFacePineTimeStyle.h @@ -9,7 +9,7 @@ #include "displayapp/screens/BatteryIcon.h" #include "displayapp/Colors.h" #include "components/datetime/DateTimeController.h" -#include "components/ble/weather/WeatherService.h" +#include "components/ble/SimpleWeatherService.h" #include "components/ble/BleController.h" #include "utility/DirtyValue.h" @@ -33,7 +33,7 @@ namespace Pinetime { Controllers::NotificationManager& notificationManager, Controllers::Settings& settingsController, Controllers::MotionController& motionController, - Controllers::WeatherService& weather); + Controllers::SimpleWeatherService& weather); ~WatchFacePineTimeStyle() override; bool OnTouchEvent(TouchEvents event) override; @@ -61,9 +61,7 @@ namespace Pinetime { Utility::DirtyValue> currentDateTime {}; Utility::DirtyValue stepCount {}; Utility::DirtyValue notificationState {}; - Utility::DirtyValue nowTemp {}; - int16_t clouds = 0; - int16_t precip = 0; + Utility::DirtyValue> currentWeather {}; static Pinetime::Controllers::Settings::Colors GetNext(Controllers::Settings::Colors color); static Pinetime::Controllers::Settings::Colors GetPrevious(Controllers::Settings::Colors color); @@ -114,7 +112,7 @@ namespace Pinetime { Controllers::NotificationManager& notificationManager; Controllers::Settings& settingsController; Controllers::MotionController& motionController; - Controllers::WeatherService& weatherService; + Controllers::SimpleWeatherService& weatherService; void SetBatteryIcon(); void CloseMenu(); -- cgit v1.2.3-70-g09d2