summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Clock.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-02-23 13:44:39 +0100
committerJF <jf@codingfield.com>2020-02-23 13:44:39 +0100
commit02772b996fb26146cf38fc6deccff7f43a49dfd6 (patch)
treef2ff90c577f68ccb44b6470621bf87e68a49aed8 /src/DisplayApp/Screens/Clock.h
parent2bdff7ed2b490cb8ce5599341e12d707c0ba7fd0 (diff)
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.
Diffstat (limited to 'src/DisplayApp/Screens/Clock.h')
-rw-r--r--src/DisplayApp/Screens/Clock.h11
1 files changed, 6 insertions, 5 deletions
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;
+
};
}
}