diff options
author | Jean-François Milants <jf@codingfield.com> | 2021-03-31 19:47:27 +0200 |
---|---|---|
committer | Jean-François Milants <jf@codingfield.com> | 2021-04-04 15:56:04 +0200 |
commit | 68bdaee1cc301a2aca1849f38d2596debe7d67d1 (patch) | |
tree | 00f3bd9a1554c286aa2d5bd3a86bcfcdf7ba7171 /src/displayapp/screens/WatchFaceDigital.cpp | |
parent | 04fc33e2d479161ec261f932b908dffbd73e227f (diff) |
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".
Diffstat (limited to 'src/displayapp/screens/WatchFaceDigital.cpp')
-rw-r--r-- | src/displayapp/screens/WatchFaceDigital.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index c39fe496..2204e177 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -11,6 +11,7 @@ #include "components/ble/BleController.h" #include "components/ble/NotificationManager.h" #include "components/heartrate/HeartRateController.h" +#include "components/motion/MotionController.h" #include "components/settings/Settings.h" #include "../DisplayApp.h" @@ -23,11 +24,13 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app, Controllers::Ble& bleController, Controllers::NotificationManager& notificatioManager, Controllers::Settings &settingsController, - Controllers::HeartRateController& heartRateController): Screen(app), currentDateTime{{}}, + Controllers::HeartRateController& heartRateController, + Controllers::MotionController& motionController) : Screen(app), currentDateTime{{}}, dateTimeController{dateTimeController}, batteryController{batteryController}, bleController{bleController}, notificatioManager{notificatioManager}, settingsController{settingsController}, - heartRateController{heartRateController} { + heartRateController{heartRateController}, + motionController{motionController} { settingsController.SetClockFace(0); displayedChar[0] = 0; @@ -236,7 +239,7 @@ bool WatchFaceDigital::Refresh() { lv_obj_align(heartbeatBpm, heartbeatValue, LV_ALIGN_OUT_RIGHT_MID, 5, 0); } - // TODO stepCount = stepController.GetValue(); + stepCount = motionController.NbSteps(); if(stepCount.IsUpdated()) { char stepBuffer[5]; sprintf(stepBuffer, "%lu", stepCount.Get()); |