Do not set unsigned step count to -1

This commit is contained in:
Sándor Rátkai 2024-09-11 08:35:28 +02:00 committed by Hunman
parent 5b38885b44
commit 29f8c8e30c

View file

@ -37,8 +37,11 @@ namespace {
}
void MotionController::AdvanceDay() {
--nbSteps; // Higher index = further in the past
nbSteps[today] = -1; // Ensure that the `this->nbSteps[today] != nbSteps` condition in `Update()` will be FALSE
--nbSteps; // Higher index = further in the past
nbSteps[today] = 0;
if (service != nullptr) {
service->OnNewStepCountValue(nbSteps[today]);
}
}
void MotionController::Update(int16_t x, int16_t y, int16_t z, MotionController::step_t nbSteps) {