WatchFaceAnalog: local date/time variables
Use local date and time variables. No need to store them in the object.
This commit is contained in:
parent
21da5869c5
commit
1379b7902f
|
@ -137,9 +137,9 @@ WatchFaceAnalog::~WatchFaceAnalog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void WatchFaceAnalog::UpdateClock() {
|
void WatchFaceAnalog::UpdateClock() {
|
||||||
hour = dateTimeController.Hours();
|
uint8_t hour = dateTimeController.Hours();
|
||||||
minute = dateTimeController.Minutes();
|
uint8_t minute = dateTimeController.Minutes();
|
||||||
second = dateTimeController.Seconds();
|
uint8_t second = dateTimeController.Seconds();
|
||||||
|
|
||||||
if (sMinute != minute) {
|
if (sMinute != minute) {
|
||||||
auto const angle = minute * 6;
|
auto const angle = minute * 6;
|
||||||
|
@ -214,9 +214,9 @@ void WatchFaceAnalog::Refresh() {
|
||||||
currentDateTime = dateTimeController.CurrentDateTime();
|
currentDateTime = dateTimeController.CurrentDateTime();
|
||||||
|
|
||||||
if (currentDateTime.IsUpdated()) {
|
if (currentDateTime.IsUpdated()) {
|
||||||
month = dateTimeController.Month();
|
Pinetime::Controllers::DateTime::Months month = dateTimeController.Month();
|
||||||
day = dateTimeController.Day();
|
uint8_t day = dateTimeController.Day();
|
||||||
dayOfWeek = dateTimeController.DayOfWeek();
|
Pinetime::Controllers::DateTime::Days dayOfWeek = dateTimeController.DayOfWeek();
|
||||||
|
|
||||||
UpdateClock();
|
UpdateClock();
|
||||||
|
|
||||||
|
|
|
@ -35,13 +35,6 @@ namespace Pinetime {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint8_t sHour, sMinute, sSecond;
|
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::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown;
|
||||||
Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
|
Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
|
||||||
|
|
Loading…
Reference in a new issue