properly format using clang-format
This commit is contained in:
parent
7ae790bcdb
commit
5dbe1f77b5
|
@ -100,8 +100,8 @@ void HeartRateTask::StopMeasurement() {
|
|||
}
|
||||
|
||||
void HeartRateTask::StartWaiting() {
|
||||
StopMeasurement();
|
||||
backgroundWaitingStart = xTaskGetTickCount();
|
||||
StopMeasurement();
|
||||
backgroundWaitingStart = xTaskGetTickCount();
|
||||
}
|
||||
|
||||
void HeartRateTask::HandleBackgroundWaiting() {
|
||||
|
@ -138,22 +138,23 @@ void HeartRateTask::HandleSensorData(int* lastBpm) {
|
|||
StartWaiting();
|
||||
}
|
||||
}
|
||||
if (bpm == 0 && state == States::BackgroundMeasuring && xTaskGetTickCount() - measurementStart >= DURATION_UNTIL_BACKGROUND_MEASURMENT_IS_STOPPED) {
|
||||
if (bpm == 0 && state == States::BackgroundMeasuring &&
|
||||
xTaskGetTickCount() - measurementStart >= DURATION_UNTIL_BACKGROUND_MEASURMENT_IS_STOPPED) {
|
||||
state = States::BackgroundWaiting;
|
||||
StartWaiting();
|
||||
}
|
||||
}
|
||||
|
||||
int HeartRateTask::CurrentTaskDelay() {
|
||||
switch (state) {
|
||||
case States::Measuring:
|
||||
case States::BackgroundMeasuring:
|
||||
return ppg.deltaTms;
|
||||
case States::Running:
|
||||
return 100;
|
||||
case States::BackgroundWaiting:
|
||||
return 10000;
|
||||
default:
|
||||
return portMAX_DELAY;
|
||||
}
|
||||
switch (state) {
|
||||
case States::Measuring:
|
||||
case States::BackgroundMeasuring:
|
||||
return ppg.deltaTms;
|
||||
case States::Running:
|
||||
return 100;
|
||||
case States::BackgroundWaiting:
|
||||
return 10000;
|
||||
default:
|
||||
return portMAX_DELAY;
|
||||
}
|
||||
}
|
|
@ -4,8 +4,8 @@
|
|||
#include <queue.h>
|
||||
#include <components/heartrate/Ppg.h>
|
||||
|
||||
#define DURATION_BETWEEN_BACKGROUND_MEASUREMENTS 5 * 60 * 1000 // 5 minutes assuming 1 Hz
|
||||
#define DURATION_UNTIL_BACKGROUND_MEASURMENT_IS_STOPPED 30 * 1000 // 30 seconds assuming 1 Hz
|
||||
#define DURATION_BETWEEN_BACKGROUND_MEASUREMENTS 5 * 60 * 1000 // 5 minutes assuming 1 Hz
|
||||
#define DURATION_UNTIL_BACKGROUND_MEASURMENT_IS_STOPPED 30 * 1000 // 30 seconds assuming 1 Hz
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Drivers {
|
||||
|
|
Loading…
Reference in a new issue