From baca0fc3e59e88420d6c7983ad133fe63c794ec0 Mon Sep 17 00:00:00 2001 From: JF Date: Sat, 28 Mar 2020 19:05:28 +0100 Subject: Encapsulate Notification management in NotificationManager. It implement a static array of notifications to avoid dynamic allocation. --- src/SystemTask/SystemTask.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/SystemTask/SystemTask.h') diff --git a/src/SystemTask/SystemTask.h b/src/SystemTask/SystemTask.h index b64fda65..a1ba277a 100644 --- a/src/SystemTask/SystemTask.h +++ b/src/SystemTask/SystemTask.h @@ -16,13 +16,11 @@ namespace Pinetime { enum class Messages {GoToSleep, GoToRunning, OnNewTime, OnNewNotification }; - SystemTask(Pinetime::Drivers::SpiMaster& spi, - Pinetime::Drivers::St7789& lcd, - Pinetime::Drivers::Cst816S& touchPanel, - Pinetime::Components::LittleVgl& lvgl, - Pinetime::Controllers::Battery& batteryController, - Pinetime::Controllers::Ble& bleController, - Pinetime::Controllers::DateTime& dateTimeController); + SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd, Drivers::Cst816S &touchPanel, + Components::LittleVgl &lvgl, + Controllers::Battery &batteryController, Controllers::Ble &bleController, + Controllers::DateTime &dateTimeController, + Pinetime::Controllers::NotificationManager& manager); void Start(); @@ -45,6 +43,7 @@ namespace Pinetime { bool isSleeping = false; Pinetime::Drivers::Watchdog watchdog; Pinetime::Drivers::WatchdogView watchdogView; + Pinetime::Controllers::NotificationManager& notificationManager; static constexpr uint8_t pinSpiSck = 2; -- cgit v1.2.3-70-g09d2