From 68bdaee1cc301a2aca1849f38d2596debe7d67d1 Mon Sep 17 00:00:00 2001 From: Jean-François Milants Date: Wed, 31 Mar 2021 19:47:27 +0200 Subject: First integration of the motion sensor (bma 421) : step counting + wake on wrist rotation + app to see the value of the 3 axis in "real time". --- src/displayapp/screens/Clock.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/displayapp/screens/Clock.cpp') diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp index 69180370..1cbd0a91 100644 --- a/src/displayapp/screens/Clock.cpp +++ b/src/displayapp/screens/Clock.cpp @@ -8,6 +8,7 @@ #include "NotificationIcon.h" #include "Symbols.h" #include "components/battery/BatteryController.h" +#include "components/motion/MotionController.h" #include "components/ble/BleController.h" #include "components/ble/NotificationManager.h" #include "../DisplayApp.h" @@ -23,12 +24,14 @@ Clock::Clock(DisplayApp* app, Controllers::Ble& bleController, Controllers::NotificationManager& notificatioManager, Controllers::Settings &settingsController, - Controllers::HeartRateController& heartRateController) : Screen(app), + Controllers::HeartRateController& heartRateController, + Controllers::MotionController& motionController) : Screen(app), dateTimeController{dateTimeController}, batteryController{batteryController}, bleController{bleController}, notificatioManager{notificatioManager}, settingsController{settingsController}, heartRateController{heartRateController}, - screens{app, + motionController{motionController}, + screens{app, settingsController.GetClockFace(), { [this]() -> std::unique_ptr { return WatchFaceDigitalScreen(); }, @@ -64,7 +67,7 @@ bool Clock::OnTouchEvent(Pinetime::Applications::TouchEvents event) { } std::unique_ptr Clock::WatchFaceDigitalScreen() { - return std::make_unique(app, dateTimeController, batteryController, bleController, notificatioManager, settingsController, heartRateController); + return std::make_unique(app, dateTimeController, batteryController, bleController, notificatioManager, settingsController, heartRateController, motionController); } std::unique_ptr Clock::WatchFaceAnalogScreen() { -- cgit v1.2.3-70-g09d2