summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/WatchFaceInfineat.h
diff options
context:
space:
mode:
authorDiego Miguel <dmlls@diegomiguel.me>2022-04-01 16:22:26 +0200
committerDiego Miguel <dmlls@diegomiguel.me>2022-06-11 16:57:24 +0200
commitb5bf6c51a462a94d2765cc33dd6a8afa0836e8ef (patch)
tree613b6a59e9fb83a63b1e113bd145d40a6ad01552 /src/displayapp/screens/WatchFaceInfineat.h
parent9122547657528a85cd237cdf90299f4ad171ca1a (diff)
Implement battery indicator
Diffstat (limited to 'src/displayapp/screens/WatchFaceInfineat.h')
-rw-r--r--src/displayapp/screens/WatchFaceInfineat.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/displayapp/screens/WatchFaceInfineat.h b/src/displayapp/screens/WatchFaceInfineat.h
index da9d9964..42d2d16d 100644
--- a/src/displayapp/screens/WatchFaceInfineat.h
+++ b/src/displayapp/screens/WatchFaceInfineat.h
@@ -10,6 +10,7 @@
namespace Pinetime {
namespace Controllers {
class Settings;
+ class Battery;
class Ble;
class NotificationManager;
class MotionController;
@@ -22,6 +23,7 @@ namespace Pinetime {
public:
WatchFaceInfineat(DisplayApp* app,
Controllers::DateTime& dateTimeController,
+ Controllers::Battery& batteryController,
Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,
Controllers::Settings& settingsController,
@@ -66,6 +68,7 @@ namespace Pinetime {
lv_obj_t* line6;
lv_obj_t* line7;
lv_obj_t* line8;
+ lv_obj_t* lineBattery;
lv_style_t line0Style;
lv_style_t line1Style;
@@ -76,6 +79,7 @@ namespace Pinetime {
lv_style_t line6Style;
lv_style_t line7Style;
lv_style_t line8Style;
+ lv_style_t lineBatteryStyle;
lv_point_t line0Points[2];
lv_point_t line1Points[2];
@@ -86,6 +90,7 @@ namespace Pinetime {
lv_point_t line6Points[2];
lv_point_t line7Points[2];
lv_point_t line8Points[2];
+ lv_point_t lineBatteryPoints[2];
lv_obj_t* logoPine;
@@ -120,11 +125,14 @@ namespace Pinetime {
} infineatColors;
Controllers::DateTime& dateTimeController;
+ Controllers::Battery& batteryController;
Controllers::Ble& bleController;
Controllers::NotificationManager& notificationManager;
Controllers::Settings& settingsController;
Controllers::MotionController& motionController;
+ void SetBatteryLevel(uint8_t batteryPercent);
+
lv_task_t* taskRefresh;
};
}