forked from InfiniTimeOrg/InfiniTime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Motion.h
46 lines (38 loc) · 1.11 KB
/
Motion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <cstdint>
#include <chrono>
#include "displayapp/screens/Screen.h"
#include <lvgl/src/lv_core/lv_style.h>
#include <lvgl/src/lv_core/lv_obj.h>
#include <components/motion/MotionController.h>
#include "displayapp/Controllers.h"
#include "displayapp/apps/Apps.h"
namespace Pinetime {
namespace Applications {
namespace Screens {
class Motion : public Screen {
public:
Motion(Controllers::MotionController& motionController);
~Motion() override;
void Refresh() override;
private:
Controllers::MotionController& motionController;
lv_obj_t* chart;
lv_chart_series_t* ser1;
lv_chart_series_t* ser2;
lv_chart_series_t* ser3;
lv_obj_t* label;
lv_obj_t* labelStep;
lv_task_t* taskRefresh;
};
}
template <>
struct AppTraits<Apps::Motion> {
static constexpr Apps app = Apps::Motion;
static constexpr const char* icon = "M";
static Screens::Screen* Create(AppControllers& controllers) {
return new Screens::Motion(controllers.motionController);
};
};
}
}