summaryrefslogtreecommitdiff
path: root/src/systemtask/SystemTask.cpp
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-03-07 07:44:14 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-03-07 07:44:14 (GMT)
commit9f67e6f6525bd4071609ff9edd6ce132d7ca1464 (patch)
tree65b2dc22bb257c6dd4fc8be77762173b564c340c /src/systemtask/SystemTask.cpp
parent740b3d7b58dd92a6a6f99620a090ae4f05c03299 (diff)
parentada942535718d48eec37cca4f50d678e7201dc67 (diff)
Merge branch 'develop' into recovery-firmware
# Conflicts: # src/CMakeLists.txt # src/displayapp/DisplayApp.h # src/systemtask/SystemTask.cpp # src/systemtask/SystemTask.h
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
-rw-r--r--src/systemtask/SystemTask.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp
index 11379fd..a4f2b14 100644
--- a/src/systemtask/SystemTask.cpp
+++ b/src/systemtask/SystemTask.cpp
@@ -39,14 +39,14 @@ SystemTask::SystemTask(Drivers::SpiMaster &spi, Drivers::St7789 &lcd,
Components::LittleVgl &lvgl,
Controllers::Battery &batteryController, Controllers::Ble &bleController,
Controllers::DateTime &dateTimeController,
- Pinetime::Controllers::NotificationManager& notificationManager,
+ Pinetime::Controllers::MotorController& motorController,
Pinetime::Drivers::Hrs3300& heartRateSensor) :
spi{spi}, lcd{lcd}, spiNorFlash{spiNorFlash},
twiMaster{twiMaster}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController},
heartRateController{*this},
bleController{bleController}, dateTimeController{dateTimeController},
- watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager},
- heartRateSensor{heartRateSensor},
+ watchdog{}, watchdogView{watchdog},
+ motorController{motorController}, heartRateSensor{heartRateSensor},
nimbleController(*this, bleController,dateTimeController, notificationManager, batteryController, spiNorFlash, heartRateController) {
systemTasksMsgQueue = xQueueCreate(10, 1);
}
@@ -79,9 +79,12 @@ void SystemTask::Work() {
twiMaster.Init();
touchPanel.Init();
batteryController.Init();
+ motorController.Init();
+
displayApp.reset(new Pinetime::Applications::DisplayApp(lcd, lvgl, touchPanel, batteryController, bleController,
- dateTimeController, watchdogView, *this, notificationManager, heartRateController));
+ dateTimeController, watchdogView, *this, notificationManager,
+ heartRateController));
displayApp->Start();
batteryController.Update();
@@ -158,6 +161,7 @@ void SystemTask::Work() {
break;
case Messages::OnNewNotification:
if(isSleeping && !isWakingUp) GoToRunning();
+ if(notificationManager.IsVibrationEnabled()) motorController.SetDuration(35);
displayApp->PushMessage(Pinetime::Applications::Display::Messages::NewNotification);
break;
case Messages::BleConnected: