summaryrefslogtreecommitdiff
path: root/src/displayapp/screens
diff options
context:
space:
mode:
authorReinhold Gschweicher <pyro4hell@gmail.com>2022-03-14 20:33:14 +0100
committerReinhold Gschweicher <pyro4hell@gmail.com>2022-03-14 21:00:07 +0100
commit1379b7902fca8628614af358bac7d546cc94efdc (patch)
tree95cdcada9f1641115467f36bdda66a9f0b54765f /src/displayapp/screens
parent21da5869c5e48df666ea9d9c7698f7f69528645e (diff)
WatchFaceAnalog: local date/time variables
Use local date and time variables. No need to store them in the object.
Diffstat (limited to 'src/displayapp/screens')
-rw-r--r--src/displayapp/screens/WatchFaceAnalog.cpp12
-rw-r--r--src/displayapp/screens/WatchFaceAnalog.h7
2 files changed, 6 insertions, 13 deletions
diff --git a/src/displayapp/screens/WatchFaceAnalog.cpp b/src/displayapp/screens/WatchFaceAnalog.cpp
index f1b91444..61042816 100644
--- a/src/displayapp/screens/WatchFaceAnalog.cpp
+++ b/src/displayapp/screens/WatchFaceAnalog.cpp
@@ -137,9 +137,9 @@ WatchFaceAnalog::~WatchFaceAnalog() {
}
void WatchFaceAnalog::UpdateClock() {
- hour = dateTimeController.Hours();
- minute = dateTimeController.Minutes();
- second = dateTimeController.Seconds();
+ uint8_t hour = dateTimeController.Hours();
+ uint8_t minute = dateTimeController.Minutes();
+ uint8_t second = dateTimeController.Seconds();
if (sMinute != minute) {
auto const angle = minute * 6;
@@ -214,9 +214,9 @@ void WatchFaceAnalog::Refresh() {
currentDateTime = dateTimeController.CurrentDateTime();
if (currentDateTime.IsUpdated()) {
- month = dateTimeController.Month();
- day = dateTimeController.Day();
- dayOfWeek = dateTimeController.DayOfWeek();
+ Pinetime::Controllers::DateTime::Months month = dateTimeController.Month();
+ uint8_t day = dateTimeController.Day();
+ Pinetime::Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
UpdateClock();
diff --git a/src/displayapp/screens/WatchFaceAnalog.h b/src/displayapp/screens/WatchFaceAnalog.h
index a18eb299..9412d739 100644
--- a/src/displayapp/screens/WatchFaceAnalog.h
+++ b/src/displayapp/screens/WatchFaceAnalog.h
@@ -35,13 +35,6 @@ namespace Pinetime {
private:
uint8_t sHour, sMinute, sSecond;
- uint8_t hour;
- uint8_t minute;
- uint8_t second;
-
- Pinetime::Controllers::DateTime::Months month;
- uint8_t day;
- Pinetime::Controllers::DateTime::Days dayOfWeek;
Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown;
Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;