diff options
| author | JF <jf@codingfield.com> | 2020-01-11 17:14:12 +0100 |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-01-11 17:14:12 +0100 |
| commit | 8253c099d9178c275f0d0d4ea7766f54afd0b38d (patch) | |
| tree | 0381ba0a967fc2b78307f588c886268fe474cfe5 /src/DisplayApp/DisplayApp.h | |
| parent | 1e25f51af708544434f48d434602da0e3ecb60cf (diff) | |
Add date library (https://github.com/HowardHinnant/date) to manage the date and time.
The date is now properly processed (31 December 2019 23:59:59 + 1s => 1 January 2020 00:00:00)
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
| -rw-r--r-- | src/DisplayApp/DisplayApp.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 75c74227..1e9e2e89 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -11,6 +11,7 @@ #include <Components/DateTime/DateTimeController.h> #include "lcdfont14.h" #include "../drivers/Cst816s.h" +#include <date/date.h> extern const FONT_INFO lCD_70ptFontInfo; @@ -40,11 +41,10 @@ namespace Pinetime { static const char* MonthToString(Pinetime::Controllers::DateTime::Months month); static const char* DayOfWeekToString(Pinetime::Controllers::DateTime::Days dayOfWeek); - uint8_t seconds = 0; - uint8_t minutes = 0; - uint8_t hours = 0; + char currentChar[4]; uint32_t deltaSeconds = 0; + date::year_month_day currentYmd; States state = States::Running; void RunningState(); @@ -62,7 +62,6 @@ namespace Pinetime { static char const *DaysString[]; static char const *MonthsString[]; - bool dateUpdated = false; Pinetime::Drivers::Cst816S touchPanel; void OnTouchEvent(); |
