Add start of settings app for senstivity.
really just debugging. I want to make it more configurable then high med low. Position of setting needs a new location...dynamicly adding it currently at the end. Which honestly im fine with.
This commit is contained in:
parent
ad42cdf120
commit
3ebf002f9d
10 changed files with 145 additions and 8 deletions
|
|
@ -45,12 +45,12 @@ bool MotionController::Should_RaiseWake(bool isSleeping) {
|
|||
return false;
|
||||
}
|
||||
|
||||
bool MotionController::Should_ShakeWake() {
|
||||
bool MotionController::Should_ShakeWake(uint16_t thresh) {
|
||||
bool wake = false;
|
||||
auto diff = xTaskGetTickCount() - lastShakeTime;
|
||||
lastShakeTime = xTaskGetTickCount();
|
||||
int32_t speed = std::abs(y + z - lastYForShake - lastZForShake) / diff * 10;
|
||||
if (speed > 150) { // TODO move threshold to a setting
|
||||
if (speed > thresh) {
|
||||
wake = true;
|
||||
}
|
||||
lastXForShake = x;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,8 @@ namespace Pinetime {
|
|||
uint32_t GetTripSteps() const {
|
||||
return currentTripSteps;
|
||||
}
|
||||
bool Should_ShakeWake();
|
||||
|
||||
bool Should_ShakeWake(uint16_t thresh);
|
||||
bool Should_RaiseWake(bool isSleeping);
|
||||
|
||||
void IsSensorOk(bool isOk);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue