From 0370e3cd65fd77e9dd5289fa5484fcebd477fcf7 Mon Sep 17 00:00:00 2001 From: Patric Gruber Date: Mon, 3 Apr 2023 21:29:17 +0200 Subject: [PATCH] remove background start timestamp reset on sleep --- src/heartratetask/HeartRateTask.cpp | 1 - src/heartratetask/HeartRateTask.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/heartratetask/HeartRateTask.cpp b/src/heartratetask/HeartRateTask.cpp index f332fadf..f48045d8 100644 --- a/src/heartratetask/HeartRateTask.cpp +++ b/src/heartratetask/HeartRateTask.cpp @@ -37,7 +37,6 @@ void HeartRateTask::Work() { state = States::Idle; } else if (state == States::Measuring) { state = States::BackgroundWaiting; - backgroundMeasurementWaitingStart = xTaskGetTickCount(); StopMeasurement(); } break; diff --git a/src/heartratetask/HeartRateTask.h b/src/heartratetask/HeartRateTask.h index ab058227..61151af2 100644 --- a/src/heartratetask/HeartRateTask.h +++ b/src/heartratetask/HeartRateTask.h @@ -42,7 +42,7 @@ namespace Pinetime { Controllers::HeartRateController& controller; Controllers::Ppg ppg; int lastBpm = 0; - TickType_t backgroundMeasurementWaitingStart; + TickType_t backgroundMeasurementWaitingStart = 0; }; }