2021-01-10 11:57:26 -05:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <chrono>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include <bits/unique_ptr.h>
|
2021-04-03 22:08:51 -04:00
|
|
|
#include "systemtask/SystemTask.h"
|
2021-01-10 11:57:26 -05: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 {
|
|
|
|
|
2021-04-18 13:28:14 -04:00
|
|
|
class HeartRate : public Screen {
|
|
|
|
public:
|
|
|
|
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
|
2021-01-10 11:57:26 -05:00
|
|
|
~HeartRate() override;
|
|
|
|
|
|
|
|
bool Refresh() override;
|
2021-04-18 13:28:14 -04:00
|
|
|
|
2021-01-17 04:39:46 -05:00
|
|
|
void OnStartStopEvent(lv_event_t event);
|
2021-01-10 11:57:26 -05:00
|
|
|
|
2021-04-18 13:28:14 -04:00
|
|
|
private:
|
2021-01-10 11:57:26 -05:00
|
|
|
Controllers::HeartRateController& heartRateController;
|
2021-04-03 22:08:51 -04:00
|
|
|
Pinetime::System::SystemTask& systemTask;
|
2021-01-17 04:39:46 -05:00
|
|
|
void UpdateStartStopButton(bool isRunning);
|
2021-01-10 11:57:26 -05:00
|
|
|
lv_obj_t* label_hr;
|
|
|
|
lv_obj_t* label_bpm;
|
|
|
|
lv_obj_t* label_status;
|
2021-01-17 04:39:46 -05:00
|
|
|
lv_obj_t* btn_startStop;
|
|
|
|
lv_obj_t* label_startStop;
|
2021-01-10 11:57:26 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|