summaryrefslogtreecommitdiff
path: root/src/displayapp/DisplayApp.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-01-10 16:57:26 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-01-10 16:57:26 (GMT)
commit1a582815ba218d2a9047abae92b9f33a3301ffd5 (patch)
tree18aa0aeba146d990a0302f4840e870cad1c4ad6f /src/displayapp/DisplayApp.cpp
parent50ae0ae5e073ac48652e6c26549f9b19655e8da3 (diff)
First implementation of the HR sensor using 100% foss code (ported from waspos)
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
-rw-r--r--src/displayapp/DisplayApp.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp
index 162d022..b10b1e1 100644
--- a/src/displayapp/DisplayApp.cpp
+++ b/src/displayapp/DisplayApp.cpp
@@ -1,5 +1,6 @@
#include "DisplayApp.h"
#include <libraries/log/nrf_log.h>
+#include <displayapp/screens/HeartRate.h>
#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;
}