diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index a4a759d9..106d19eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,6 +16,7 @@ #include <drivers/SpiMaster.h> #include <DisplayApp/LittleVgl.h> #include <SystemTask/SystemTask.h> +#include <Components/Ble/NotificationManager.h> #if NRF_LOG_ENABLED #include "Logging/NrfLogger.h" @@ -55,6 +56,8 @@ void ble_manager_set_ble_disconnection_callback(void (*disconnection)()); static constexpr uint8_t pinTouchIrq = 28; std::unique_ptr<Pinetime::System::SystemTask> systemTask; +Pinetime::Controllers::NotificationManager notificationManager; + void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { if(pin == pinTouchIrq) { systemTask->OnTouchEvent(); @@ -86,7 +89,7 @@ void OnBleDisconnection() { } void OnNewNotification(const char* message, uint8_t size) { - bleController.PushNotification(message, size); + notificationManager.Push(Pinetime::Controllers::NotificationManager::Categories::SimpleAlert, message, size); systemTask->PushMessage(Pinetime::System::SystemTask::Messages::OnNewNotification); } @@ -128,7 +131,8 @@ int main(void) { debounceTimer = xTimerCreate ("debounceTimer", 200, pdFALSE, (void *) 0, DebounceTimerCallback); - systemTask.reset(new Pinetime::System::SystemTask(spi, lcd, touchPanel, lvgl, batteryController, bleController, dateTimeController)); + systemTask.reset(new Pinetime::System::SystemTask(spi, lcd, touchPanel, lvgl, batteryController, bleController, + dateTimeController, notificationManager)); systemTask->Start(); ble_manager_init(); |