shakewake: Switch to more generic timekeeping

Could be used for other motion-based algorithms in the future.
This commit is contained in:
Finlay Davidson
2023-03-05 15:19:52 +01:00
committed by Riku Isokoski
parent a43463762c
commit 76e79df375
2 changed files with 10 additions and 7 deletions

View File

@@ -2,6 +2,8 @@
#include <cstdint>
#include <FreeRTOS.h>
#include "drivers/Bma421.h"
#include "components/ble/MotionService.h"
@@ -65,19 +67,20 @@ namespace Pinetime {
uint32_t nbSteps;
uint32_t currentTripSteps = 0;
TickType_t lastTime = 0;
TickType_t time = 0;
int16_t x;
int16_t lastYForWakeUp = 0;
int16_t lastY = 0;
int16_t y;
int16_t lastZ = 0;
int16_t z;
int32_t accumulatedSpeed = 0;
bool isSensorOk = false;
DeviceTypes deviceType = DeviceTypes::Unknown;
Pinetime::Controllers::MotionService* service = nullptr;
int32_t accumulatedSpeed = 0;
uint32_t lastShakeTime = 0;
};
}
}