We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6b9e3c commit e498b17Copy full SHA for e498b17
src/heartratetask/HeartRateTask.cpp
@@ -87,7 +87,11 @@ void HeartRateTask::StartMeasurement() {
87
heartRateSensor.Enable();
88
ppg.Reset(true);
89
vTaskDelay(100);
90
- measurementStart = xTaskGetTickCount();
+
91
+ if (state == States::ScreenOffAndMeasuring) {
92
+ // only set the start timestamp when the screen is off
93
+ measurementStart = xTaskGetTickCount();
94
+ }
95
}
96
97
void HeartRateTask::StopMeasurement() {
0 commit comments