Added Shake to wake
This commit is contained in:
@@ -13,6 +13,10 @@ namespace Pinetime {
|
||||
BMA421,
|
||||
BMA425,
|
||||
};
|
||||
enum class WakeUpMode : uint8_t {
|
||||
RaiseWrist = 0,
|
||||
Shake,
|
||||
};
|
||||
|
||||
void Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps);
|
||||
|
||||
@@ -35,7 +39,8 @@ namespace Pinetime {
|
||||
uint32_t GetTripSteps() const {
|
||||
return currentTripSteps;
|
||||
}
|
||||
bool ShouldWakeUp(bool isSleeping);
|
||||
bool Should_ShakeWake();
|
||||
bool Should_RaiseWake(bool isSleeping);
|
||||
|
||||
void IsSensorOk(bool isOk);
|
||||
bool IsSensorOk() const {
|
||||
@@ -59,6 +64,11 @@ namespace Pinetime {
|
||||
bool isSensorOk = false;
|
||||
DeviceTypes deviceType = DeviceTypes::Unknown;
|
||||
Pinetime::Controllers::MotionService* service = nullptr;
|
||||
|
||||
int16_t lastXForShake = 0;
|
||||
int16_t lastYForShake = 0;
|
||||
int16_t lastZForShake = 0;
|
||||
uint32_t lastShakeTime = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user