From 1a582815ba218d2a9047abae92b9f33a3301ffd5 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Sun, 10 Jan 2021 17:57:26 +0100 Subject: First implementation of the HR sensor using 100% foss code (ported from waspos) --- src/displayapp/DisplayApp.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/displayapp/DisplayApp.cpp') diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 162d0226..b10b1e1a 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -1,5 +1,6 @@ #include "DisplayApp.h" #include +#include #include "components/battery/BatteryController.h" #include "components/ble/BleController.h" #include "components/datetime/DateTimeController.h" @@ -29,7 +30,8 @@ DisplayApp::DisplayApp(Drivers::St7789 &lcd, Components::LittleVgl &lvgl, Driver Controllers::Battery &batteryController, Controllers::Ble &bleController, Controllers::DateTime &dateTimeController, Drivers::WatchdogView &watchdog, System::SystemTask &systemTask, - Pinetime::Controllers::NotificationManager& notificationManager) : + Pinetime::Controllers::NotificationManager& notificationManager, + Pinetime::Controllers::HeartRateController& heartRateController) : lcd{lcd}, lvgl{lvgl}, batteryController{batteryController}, @@ -39,7 +41,8 @@ DisplayApp::DisplayApp(Drivers::St7789 &lcd, Components::LittleVgl &lvgl, Driver touchPanel{touchPanel}, currentScreen{new Screens::Clock(this, dateTimeController, batteryController, bleController, notificationManager) }, systemTask{systemTask}, - notificationManager{notificationManager} { + notificationManager{notificationManager}, + heartRateController{heartRateController} { msgQueue = xQueueCreate(queueSize, itemSize); onClockApp = true; modal.reset(new Screens::Modal(this)); @@ -211,6 +214,7 @@ void DisplayApp::RunningState() { case Apps::Music : currentScreen.reset(new Screens::Music(this, systemTask.nimble().music())); break; case Apps::FirmwareValidation: currentScreen.reset(new Screens::FirmwareValidation(this, validator)); break; case Apps::Notifications: currentScreen.reset(new Screens::Notifications(this, notificationManager, Screens::Notifications::Modes::Normal)); break; + case Apps::HeartRate: currentScreen.reset(new Screens::HeartRate(this, heartRateController)); break; } nextApp = Apps::None; } -- cgit v1.2.3-70-g09d2