InfiniTime/src/displayapp/screens/HeartRate.h

42 lines
1.0 KiB
C
Raw Normal View History

#pragma once
#include <cstdint>
#include <chrono>
#include "Screen.h"
#include <bits/unique_ptr.h>
#include "systemtask/SystemTask.h"
#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 {
2021-04-24 09:00:45 +00:00
public:
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
~HeartRate() override;
2021-07-19 13:26:12 +00:00
void Refresh() override;
void OnStartStopEvent(lv_event_t event);
2021-04-24 09:00:45 +00:00
private:
Controllers::HeartRateController& heartRateController;
Pinetime::System::SystemTask& systemTask;
void UpdateStartStopButton(bool isRunning);
lv_obj_t* label_hr;
lv_obj_t* label_bpm;
lv_obj_t* label_status;
lv_obj_t* btn_startStop;
lv_obj_t* label_startStop;
2021-07-19 13:26:12 +00:00
lv_task_t* taskRefresh;
};
}
}
}