summaryrefslogtreecommitdiff
path: root/src/components/motion/MotionController.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-10-17 08:23:44 +0200
committerJean-François Milants <jf@codingfield.com>2021-10-17 08:23:44 +0200
commit60a49af886f16b4bbd8012cd711374f3fdb94efc (patch)
tree08b164d2da41e0da609af671871ab235ca813e3e /src/components/motion/MotionController.h
parentd1f50157c7e0c471ae0e260fdca82fc472635079 (diff)
Add MotionService : expose step count and RAW X/Y/Z values to the host.
Diffstat (limited to 'src/components/motion/MotionController.h')
-rw-r--r--src/components/motion/MotionController.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/motion/MotionController.h b/src/components/motion/MotionController.h
index ff715093..c72d8a4a 100644
--- a/src/components/motion/MotionController.h
+++ b/src/components/motion/MotionController.h
@@ -2,6 +2,7 @@
#include <cstdint>
#include <drivers/Bma421.h>
+#include <components/ble/MotionService.h>
namespace Pinetime {
namespace Controllers {
@@ -39,6 +40,7 @@ namespace Pinetime {
}
void Init(Pinetime::Drivers::Bma421::DeviceTypes types);
+ void SetService(Pinetime::Controllers::MotionService* service);
private:
uint32_t nbSteps;
@@ -48,6 +50,7 @@ namespace Pinetime {
int16_t lastYForWakeUp = 0;
bool isSensorOk = false;
DeviceTypes deviceType = DeviceTypes::Unknown;
+ Pinetime::Controllers::MotionService* service = nullptr;
};
}
} \ No newline at end of file