From 02772b996fb26146cf38fc6deccff7f43a49dfd6 Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 23 Feb 2020 13:44:39 +0100 Subject: Do not compile GFX and older fonts anymore. Refactor SystemTask in its own class. Refactor Screen to be able to close current screen and open a new one. Re-enable sleep/wake up and propagate button event to Screens. --- src/DisplayApp/Screens/Clock.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/DisplayApp/Screens/Clock.h') diff --git a/src/DisplayApp/Screens/Clock.h b/src/DisplayApp/Screens/Clock.h index d6e5a288..a358e41b 100644 --- a/src/DisplayApp/Screens/Clock.h +++ b/src/DisplayApp/Screens/Clock.h @@ -35,9 +35,11 @@ namespace Pinetime { class Clock : public Screen{ public: enum class BleConnectionStates{ NotConnected, Connected}; - Clock(DisplayApp* app, Components::Gfx& gfx, Controllers::DateTime& dateTimeController); + Clock(DisplayApp* app, Controllers::DateTime& dateTimeController); ~Clock() override; - void Refresh(bool fullRefresh) override; + + bool Refresh(bool fullRefresh) override; + bool OnButtonPushed() override; void SetBatteryPercentRemaining(uint8_t percent) { batteryPercentRemaining = percent; } void SetBleConnectionState(BleConnectionStates state) { bleState = state; } @@ -52,9 +54,6 @@ namespace Pinetime { char displayedChar[5]; - const FONT_INFO largeFont {lCD_70ptFontInfo.height, lCD_70ptFontInfo.startChar, lCD_70ptFontInfo.endChar, lCD_70ptFontInfo.spacePixels, lCD_70ptFontInfo.charInfo, lCD_70ptFontInfo.data}; - const FONT_INFO smallFont {lCD_14ptFontInfo.height, lCD_14ptFontInfo.startChar, lCD_14ptFontInfo.endChar, lCD_14ptFontInfo.spacePixels, lCD_14ptFontInfo.charInfo, lCD_14ptFontInfo.data}; - uint16_t currentYear = 1970; Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown; Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown; @@ -77,6 +76,8 @@ namespace Pinetime { Controllers::DateTime& dateTimeController; + bool running = true; + }; } } -- cgit v1.2.3-70-g09d2