2021-03-31 19:47:27 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <chrono>
|
|
|
|
#include "Screen.h"
|
|
|
|
#include <bits/unique_ptr.h>
|
|
|
|
#include <libs/lvgl/src/lv_core/lv_style.h>
|
|
|
|
#include <libs/lvgl/src/lv_core/lv_obj.h>
|
|
|
|
#include <components/motion/MotionController.h>
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
2021-04-18 19:28:14 +02:00
|
|
|
class Motion : public Screen {
|
2021-03-31 19:47:27 +02:00
|
|
|
public:
|
|
|
|
Motion(DisplayApp* app, Controllers::MotionController& motionController);
|
|
|
|
~Motion() override;
|
|
|
|
|
|
|
|
bool Refresh() override;
|
|
|
|
bool OnButtonPushed() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Controllers::MotionController& motionController;
|
2021-04-18 19:28:14 +02:00
|
|
|
lv_obj_t* chart;
|
|
|
|
lv_chart_series_t* ser1;
|
|
|
|
lv_chart_series_t* ser2;
|
|
|
|
lv_chart_series_t* ser3;
|
2021-03-31 19:47:27 +02:00
|
|
|
|
|
|
|
lv_obj_t* labelStep;
|
2021-05-18 15:23:26 +02:00
|
|
|
lv_obj_t* labelStepValue;
|
2021-03-31 19:47:27 +02:00
|
|
|
static constexpr uint8_t nbStepsBufferSize = 9;
|
2021-04-18 19:28:14 +02:00
|
|
|
char nbStepsBuffer[nbStepsBufferSize + 1];
|
2021-03-31 19:47:27 +02:00
|
|
|
bool running = true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|