HR Sensor : Add start/stop button to the HeartRate app (the HR sensors stays ON when the app is closed), display the HR value on the Clock app.

This commit is contained in:
Jean-François Milants
2021-01-17 10:39:46 +01:00
parent c82c22650c
commit 04063cf0af
12 changed files with 98 additions and 35 deletions

View File

@@ -12,7 +12,7 @@ namespace Pinetime {
namespace Controllers {
class HeartRateController {
public:
enum class States { NotEnoughData, NoTouch, Running};
enum class States { Stopped, NotEnoughData, NoTouch, Running};
explicit HeartRateController(System::SystemTask& systemTask);
@@ -27,7 +27,7 @@ namespace Pinetime {
private:
System::SystemTask& systemTask;
Applications::HeartRateTask* task = nullptr;
States state = States::NotEnoughData;
States state = States::Stopped;
uint8_t heartRate = 0;
};
}