aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/WatchFaceCasioStyleG7710.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/screens/WatchFaceCasioStyleG7710.h')
-rw-r--r--src/displayapp/screens/WatchFaceCasioStyleG7710.h54
1 files changed, 35 insertions, 19 deletions
diff --git a/src/displayapp/screens/WatchFaceCasioStyleG7710.h b/src/displayapp/screens/WatchFaceCasioStyleG7710.h
index 0445c9f2..0f46a692 100644
--- a/src/displayapp/screens/WatchFaceCasioStyleG7710.h
+++ b/src/displayapp/screens/WatchFaceCasioStyleG7710.h
@@ -5,9 +5,12 @@
#include <chrono>
#include <cstdint>
#include <memory>
+#include <displayapp/Controllers.h>
#include "displayapp/screens/Screen.h"
#include "components/datetime/DateTimeController.h"
#include "components/ble/BleController.h"
+#include "utility/DirtyValue.h"
+#include "displayapp/apps/Apps.h"
namespace Pinetime {
namespace Controllers {
@@ -39,24 +42,16 @@ namespace Pinetime {
static bool IsAvailable(Pinetime::Controllers::FS& filesystem);
private:
- uint8_t displayedHour = -1;
- uint8_t displayedMinute = -1;
-
- uint16_t currentYear = 1970;
- Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown;
- Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
- uint8_t currentDay = 0;
-
- DirtyValue<uint8_t> batteryPercentRemaining {};
- DirtyValue<bool> powerPresent {};
- DirtyValue<bool> bleState {};
- DirtyValue<bool> bleRadioEnabled {};
- DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>> currentDateTime {};
- DirtyValue<bool> motionSensorOk {};
- DirtyValue<uint32_t> stepCount {};
- DirtyValue<uint8_t> heartbeat {};
- DirtyValue<bool> heartbeatRunning {};
- DirtyValue<bool> notificationState {};
+ Utility::DirtyValue<uint8_t> batteryPercentRemaining {};
+ Utility::DirtyValue<bool> powerPresent {};
+ Utility::DirtyValue<bool> bleState {};
+ Utility::DirtyValue<bool> bleRadioEnabled {};
+ Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::minutes>> currentDateTime {};
+ Utility::DirtyValue<uint32_t> stepCount {};
+ Utility::DirtyValue<uint8_t> heartbeat {};
+ Utility::DirtyValue<bool> heartbeatRunning {};
+ Utility::DirtyValue<bool> notificationState {};
+ Utility::DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::days>> currentDate;
lv_point_t line_icons_points[3] {{0, 5}, {117, 5}, {122, 0}};
lv_point_t line_day_of_week_number_points[4] {{0, 0}, {100, 0}, {95, 95}, {0, 95}};
@@ -82,7 +77,7 @@ namespace Pinetime {
lv_obj_t* backgroundLabel;
lv_obj_t* bleIcon;
lv_obj_t* batteryPlug;
- lv_obj_t* label_battery_vallue;
+ lv_obj_t* label_battery_value;
lv_obj_t* heartbeatIcon;
lv_obj_t* heartbeatValue;
lv_obj_t* stepIcon;
@@ -106,5 +101,26 @@ namespace Pinetime {
lv_font_t* font_segment115 = nullptr;
};
}
+
+ template <>
+ struct WatchFaceTraits<WatchFace::CasioStyleG7710> {
+ static constexpr WatchFace watchFace = WatchFace::CasioStyleG7710;
+ static constexpr const char* name = "Casio G7710";
+
+ static Screens::Screen* Create(AppControllers& controllers) {
+ return new Screens::WatchFaceCasioStyleG7710(controllers.dateTimeController,
+ controllers.batteryController,
+ controllers.bleController,
+ controllers.notificationManager,
+ controllers.settingsController,
+ controllers.heartRateController,
+ controllers.motionController,
+ controllers.filesystem);
+ };
+
+ static bool IsAvailable(Pinetime::Controllers::FS& filesystem) {
+ return Screens::WatchFaceCasioStyleG7710::IsAvailable(filesystem);
+ }
+ };
}
}