2021-01-10 17:57:26 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <chrono>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include <bits/unique_ptr.h>
|
2021-04-04 04:08:51 +02:00
|
|
|
#include "systemtask/SystemTask.h"
|
2021-01-10 17:57:26 +01:00
|
|
|
#include <libs/lvgl/src/lv_core/lv_style.h>
|
|
|
|
#include <libs/lvgl/src/lv_core/lv_obj.h>
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Controllers {
|
|
|
|
class HeartRateController;
|
|
|
|
}
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
|
|
|
class HeartRate : public Screen{
|
|
|
|
public:
|
2021-04-04 04:08:51 +02:00
|
|
|
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask &systemTask);
|
2021-01-10 17:57:26 +01:00
|
|
|
~HeartRate() override;
|
|
|
|
|
|
|
|
bool Refresh() override;
|
2021-04-04 04:08:51 +02:00
|
|
|
|
2021-01-17 10:39:46 +01:00
|
|
|
void OnStartStopEvent(lv_event_t event);
|
2021-01-10 17:57:26 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
Controllers::HeartRateController& heartRateController;
|
2021-04-04 04:08:51 +02:00
|
|
|
Pinetime::System::SystemTask& systemTask;
|
2021-01-17 10:39:46 +01:00
|
|
|
void UpdateStartStopButton(bool isRunning);
|
2021-01-10 17:57:26 +01:00
|
|
|
lv_obj_t* label_hr;
|
|
|
|
lv_obj_t* label_bpm;
|
|
|
|
lv_obj_t* label_status;
|
2021-01-17 10:39:46 +01:00
|
|
|
lv_obj_t* btn_startStop;
|
|
|
|
lv_obj_t* label_startStop;
|
2021-01-10 17:57:26 +01:00
|
|
|
|
2021-04-04 04:08:51 +02:00
|
|
|
|
2021-01-10 17:57:26 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|