InfiniTime/src/displayapp/screens/BatteryInfo.h

40 lines
770 B
C
Raw Normal View History

#pragma once
#include <cstdint>
#include <FreeRTOS.h>
#include <timers.h>
#include "Screen.h"
#include <lvgl/lvgl.h>
namespace Pinetime {
namespace Controllers {
class Battery;
}
namespace Applications {
namespace Screens {
class BatteryInfo : public Screen {
2021-04-24 05:00:45 -04:00
public:
BatteryInfo(DisplayApp* app, Pinetime::Controllers::Battery& batteryController);
~BatteryInfo() override;
2021-07-19 09:26:12 -04:00
void Refresh() override;
2021-04-24 05:00:45 -04:00
private:
Pinetime::Controllers::Battery& batteryController;
lv_obj_t* voltage;
lv_obj_t* percent;
lv_obj_t* charging_bar;
lv_obj_t* status;
2021-07-19 09:26:12 -04:00
lv_task_t* taskRefresh;
uint8_t batteryPercent = 0;
uint16_t batteryVoltage = 0;
};
}
}
}