From 9520b2ec9b1a0696be765a8539fd5cb2bf708630 Mon Sep 17 00:00:00 2001 From: Ryan Rix Date: Sun, 9 Jun 2024 20:28:52 -0700 Subject: [PATCH] remove unused controllers from fuzzy --- src/displayapp/screens/WatchFaceFuzzy.cpp | 22 +++++++--------------- src/displayapp/screens/WatchFaceFuzzy.h | 17 +++++------------ 2 files changed, 12 insertions(+), 27 deletions(-) diff --git a/src/displayapp/screens/WatchFaceFuzzy.cpp b/src/displayapp/screens/WatchFaceFuzzy.cpp index 3d70bd17..834da064 100644 --- a/src/displayapp/screens/WatchFaceFuzzy.cpp +++ b/src/displayapp/screens/WatchFaceFuzzy.cpp @@ -5,8 +5,6 @@ #include "displayapp/screens/NotificationIcon.h" #include "displayapp/screens/Symbols.h" #include "displayapp/screens/WeatherSymbols.h" -#include "components/battery/BatteryController.h" -#include "components/ble/BleController.h" #include "components/ble/NotificationManager.h" #include "components/heartrate/HeartRateController.h" #include "components/motion/MotionController.h" @@ -16,23 +14,19 @@ using namespace Pinetime::Applications::Screens; WatchFaceFuzzy::WatchFaceFuzzy(Controllers::DateTime& dateTimeController, - const Controllers::Battery& batteryController, - const Controllers::Ble& bleController, - Controllers::NotificationManager& notificationManager, - Controllers::Settings& settingsController, - Controllers::HeartRateController& heartRateController, - Controllers::MotionController& motionController, - Controllers::SimpleWeatherService& weatherService) + Controllers::NotificationManager& notificationManager, + Controllers::Settings& settingsController, + Controllers::HeartRateController& heartRateController, + Controllers::MotionController& motionController, + Controllers::SimpleWeatherService& weatherService) : currentDateTime {{}}, dateTimeController {dateTimeController}, notificationManager {notificationManager}, settingsController {settingsController}, heartRateController {heartRateController}, motionController {motionController}, - weatherService {weatherService}, - statusIcons(batteryController, bleController) { - - statusIcons.Create(); + weatherService {weatherService} +{ notificationIcon = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_color(notificationIcon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_LIME); @@ -90,8 +84,6 @@ WatchFaceFuzzy::~WatchFaceFuzzy() { } void WatchFaceFuzzy::Refresh() { - statusIcons.Update(); - notificationState = notificationManager.AreNewNotificationsAvailable(); if (notificationState.IsUpdated()) { lv_label_set_text_static(notificationIcon, NotificationIcon::GetIcon(notificationState.Get())); diff --git a/src/displayapp/screens/WatchFaceFuzzy.h b/src/displayapp/screens/WatchFaceFuzzy.h index a7ae5c94..4c409e8b 100644 --- a/src/displayapp/screens/WatchFaceFuzzy.h +++ b/src/displayapp/screens/WatchFaceFuzzy.h @@ -28,13 +28,11 @@ namespace Pinetime { class WatchFaceFuzzy : public Screen { public: WatchFaceFuzzy(Controllers::DateTime& dateTimeController, - const Controllers::Battery& batteryController, - const Controllers::Ble& bleController, - Controllers::NotificationManager& notificationManager, - Controllers::Settings& settingsController, - Controllers::HeartRateController& heartRateController, - Controllers::MotionController& motionController, - Controllers::SimpleWeatherService& weather); + Controllers::NotificationManager& notificationManager, + Controllers::Settings& settingsController, + Controllers::HeartRateController& heartRateController, + Controllers::MotionController& motionController, + Controllers::SimpleWeatherService& weather); ~WatchFaceFuzzy() override; void Refresh() override; @@ -53,7 +51,6 @@ namespace Pinetime { Utility::DirtyValue> currentDate; lv_obj_t* label_time; - lv_obj_t* label_time_ampm; lv_obj_t* label_date; lv_obj_t* heartbeatIcon; lv_obj_t* heartbeatValue; @@ -71,8 +68,6 @@ namespace Pinetime { Controllers::SimpleWeatherService& weatherService; lv_task_t* taskRefresh; - Widgets::StatusIcons statusIcons; - static char const *nums[]; static char const *mods[]; @@ -88,8 +83,6 @@ namespace Pinetime { static Screens::Screen* Create(AppControllers& controllers) { return new Screens::WatchFaceFuzzy(controllers.dateTimeController, - controllers.batteryController, - controllers.bleController, controllers.notificationManager, controllers.settingsController, controllers.heartRateController,