2021-01-10 16:57:26 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <chrono>
|
2021-10-13 20:08:35 +00:00
|
|
|
#include "displayapp/screens/Screen.h"
|
2021-04-04 02:08:51 +00:00
|
|
|
#include "systemtask/SystemTask.h"
|
2021-11-03 22:08:57 +00:00
|
|
|
#include <lvgl/src/lv_core/lv_style.h>
|
|
|
|
#include <lvgl/src/lv_core/lv_obj.h>
|
2021-01-10 16:57:26 +00:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Controllers {
|
|
|
|
class HeartRateController;
|
|
|
|
}
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
class HeartRate : public Screen {
|
2021-04-24 09:00:45 +00:00
|
|
|
public:
|
2021-04-18 17:28:14 +00:00
|
|
|
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
|
2021-01-10 16:57:26 +00:00
|
|
|
~HeartRate() override;
|
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
void Refresh() override;
|
2021-04-18 17:28:14 +00:00
|
|
|
|
2021-01-17 09:39:46 +00:00
|
|
|
void OnStartStopEvent(lv_event_t event);
|
2021-01-10 16:57:26 +00:00
|
|
|
|
2021-04-24 09:00:45 +00:00
|
|
|
private:
|
2021-01-10 16:57:26 +00:00
|
|
|
Controllers::HeartRateController& heartRateController;
|
2021-04-04 02:08:51 +00:00
|
|
|
Pinetime::System::SystemTask& systemTask;
|
2021-01-17 09:39:46 +00:00
|
|
|
void UpdateStartStopButton(bool isRunning);
|
2021-01-10 16:57:26 +00:00
|
|
|
lv_obj_t* label_hr;
|
|
|
|
lv_obj_t* label_bpm;
|
|
|
|
lv_obj_t* label_status;
|
2021-01-17 09:39:46 +00:00
|
|
|
lv_obj_t* btn_startStop;
|
|
|
|
lv_obj_t* label_startStop;
|
2021-07-19 13:26:12 +00:00
|
|
|
|
|
|
|
lv_task_t* taskRefresh;
|
2021-01-10 16:57:26 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|