diff options
| author | JF <jf@codingfield.com> | 2020-03-28 18:05:28 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-03-28 18:05:28 (GMT) |
| commit | baca0fc3e59e88420d6c7983ad133fe63c794ec0 (patch) | |
| tree | e817de0b040712bb95129520fcc51eae59ecc161 /src/SystemTask/SystemTask.cpp | |
| parent | 68240704c7a60534342cfc0157564f11cf82d9d8 (diff) | |
Encapsulate Notification management in NotificationManager. It implement a static array of notifications to avoid dynamic allocation.
Diffstat (limited to 'src/SystemTask/SystemTask.cpp')
| -rw-r--r-- | src/SystemTask/SystemTask.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp index 0080c6b..e65abb6 100644 --- a/src/SystemTask/SystemTask.cpp +++ b/src/SystemTask/SystemTask.cpp @@ -5,17 +5,19 @@ #include <hal/nrf_rtc.h> #include <BLE/BleManager.h> #include <softdevice/common/nrf_sdh_freertos.h> +#include <Components/Ble/NotificationManager.h> #include "SystemTask.h" #include "../main.h" using namespace Pinetime::System; -SystemTask::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::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& notificationManager) : spi{spi}, lcd{lcd}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController}, bleController{bleController}, dateTimeController{dateTimeController}, - watchdog{}, watchdogView{watchdog}{ + watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager} { systemTaksMsgQueue = xQueueCreate(10, 1); } @@ -44,7 +46,8 @@ void SystemTask::Work() { touchPanel.Init(); batteryController.Init(); - displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController, dateTimeController, watchdogView, *this)); + displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController, + dateTimeController, watchdogView, *this, notificationManager)); displayApp->Start(); batteryController.Update(); |
