summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/BatteryInfo.h
diff options
context:
space:
mode:
authorJoaquim <joaquim.org@gmail.com>2021-04-04 02:08:51 (GMT)
committerJoaquim <joaquim.org@gmail.com>2021-04-04 02:08:51 (GMT)
commit1d3742e14f09316a1d795527713eb8f9742f0ffb (patch)
tree6bc6343538506b68256aa057121e063d22f8ed1a /src/displayapp/screens/BatteryInfo.h
parent58a2d000c4d49d96121894d6dd6bb861d7564bea (diff)
Big UI and navigation Rewrite
new navigation add some color to the apps redesign menus new settings menu new quick settings code clean up size reduction by converting navigation images to font and more...
Diffstat (limited to 'src/displayapp/screens/BatteryInfo.h')
-rw-r--r--src/displayapp/screens/BatteryInfo.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/displayapp/screens/BatteryInfo.h b/src/displayapp/screens/BatteryInfo.h
new file mode 100644
index 0000000..206f1ab
--- /dev/null
+++ b/src/displayapp/screens/BatteryInfo.h
@@ -0,0 +1,49 @@
+#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{
+ public:
+ BatteryInfo(DisplayApp* app,
+ Pinetime::Controllers::Battery& batteryController);
+ ~BatteryInfo() override;
+
+ bool Refresh() override;
+
+
+ void UpdateScreen();
+ void UpdateAnim();
+
+ private:
+
+ Pinetime::Controllers::Battery& batteryController;
+
+ lv_obj_t* voltage;
+ lv_obj_t* percent;
+ lv_obj_t* charging_bar;
+ lv_obj_t* status;
+
+ lv_task_t* taskUpdate;
+ lv_task_t* taskAnim;
+
+ int8_t animation = 0;
+ int8_t batteryPercent = -1;
+ float batteryVoltage = 0.0f;
+
+ };
+ }
+ }
+}