Skip to content

Commit a1d5f6f

Browse files
committed
Add logic for DisableSteps sleep option
1 parent b84b288 commit a1d5f6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/motion/MotionController.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ void MotionController::Update(int16_t x, int16_t y, int16_t z, uint32_t nbSteps)
6464
currentTripSteps += deltaSteps;
6565
}
6666
this->nbSteps = nbSteps;
67+
68+
if (settingsController.isSleepOptionOn(Settings::SleepOption::DisableSteps) &&
69+
settingsController.GetNotificationStatus() == Pinetime::Controllers::Settings::Notification::Sleep) {
70+
settingsController.sleepSteps += deltaSteps;
71+
}
6772
}
6873

6974
MotionController::AccelStats MotionController::GetAccelStats() const {

0 commit comments

Comments
 (0)