2021-04-19 14:28:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <lvgl/lvgl.h>
|
2021-10-13 20:08:35 +00:00
|
|
|
#include "displayapp/screens/Screen.h"
|
2021-04-19 14:28:38 +00:00
|
|
|
#include <components/motion/MotionController.h>
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
|
|
|
|
namespace Controllers {
|
|
|
|
class Settings;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
|
|
|
class Steps : public Screen {
|
2021-07-19 13:26:12 +00:00
|
|
|
public:
|
|
|
|
Steps(DisplayApp* app, Controllers::MotionController& motionController, Controllers::Settings& settingsController);
|
|
|
|
~Steps() override;
|
2021-04-19 14:28:38 +00:00
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
void Refresh() override;
|
2021-10-20 03:42:48 +00:00
|
|
|
void lapBtnEventHandler(lv_event_t event);
|
2021-04-19 14:28:38 +00:00
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
private:
|
|
|
|
Controllers::MotionController& motionController;
|
|
|
|
Controllers::Settings& settingsController;
|
2021-04-19 14:28:38 +00:00
|
|
|
|
2021-10-20 18:29:10 +00:00
|
|
|
uint32_t currentTripSteps = 0;
|
2021-10-20 03:42:48 +00:00
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
lv_obj_t* lSteps;
|
|
|
|
lv_obj_t* lStepsIcon;
|
|
|
|
lv_obj_t* stepsArc;
|
2021-10-23 17:41:10 +00:00
|
|
|
lv_obj_t* resetBtn;
|
|
|
|
lv_obj_t* resetButtonLabel;
|
|
|
|
lv_obj_t* tripLabel;
|
2021-04-19 14:28:38 +00:00
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
uint32_t stepsCount;
|
2021-04-19 14:28:38 +00:00
|
|
|
|
2021-07-19 13:26:12 +00:00
|
|
|
lv_task_t* taskRefresh;
|
2021-04-19 14:28:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|