Add MotionService : expose step count and RAW X/Y/Z values to the host.

This commit is contained in:
Jean-François Milants
2021-10-17 08:23:44 +02:00
parent d1f50157c7
commit 60a49af886
8 changed files with 190 additions and 3 deletions

View File

@@ -19,6 +19,7 @@
#include "NavigationService.h"
#include "ServiceDiscovery.h"
#include "HeartRateService.h"
#include "MotionService.h"
namespace Pinetime {
namespace Drivers {
@@ -43,7 +44,8 @@ namespace Pinetime {
Pinetime::Controllers::NotificationManager& notificationManager,
Controllers::Battery& batteryController,
Pinetime::Drivers::SpiNorFlash& spiNorFlash,
Controllers::HeartRateController& heartRateController);
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController);
void Init();
void StartAdvertising();
int OnGAPEvent(ble_gap_event* event);
@@ -95,6 +97,7 @@ namespace Pinetime {
BatteryInformationService batteryInformationService;
ImmediateAlertService immediateAlertService;
HeartRateService heartRateService;
MotionService motionService;
uint8_t addrType; // 1 = Random, 0 = PUBLIC
uint16_t connectionHandle = BLE_HS_CONN_HANDLE_NONE;