summaryrefslogtreecommitdiff
path: root/src/DisplayApp/DisplayApp.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-01-18 18:17:52 +0100
committerJF <jf@codingfield.com>2020-01-18 18:17:52 +0100
commitf049f382f03c946b967e1a53368c82f845299cb4 (patch)
treeca3da186765e5d0bc89a310d2c648bc12ff189d3 /src/DisplayApp/DisplayApp.h
parentf14ba4a7e336607f88548963213100cf1478290c (diff)
Encapsulate the drawing of the screen into Screens classes.
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
-rw-r--r--src/DisplayApp/DisplayApp.h24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h
index 8e92c7bb..b2a4128d 100644
--- a/src/DisplayApp/DisplayApp.h
+++ b/src/DisplayApp/DisplayApp.h
@@ -9,10 +9,11 @@
#include <Components/Battery/BatteryController.h>
#include <Components/Ble/BleController.h>
#include <Components/DateTime/DateTimeController.h>
-#include "lcdfont14.h"
+#include "Fonts/lcdfont14.h"
#include "../drivers/Cst816s.h"
#include <date/date.h>
-
+#include <DisplayApp/Screens/Clock.h>
+#include <DisplayApp/Screens/Message.h>
extern const FONT_INFO lCD_70ptFontInfo;
@@ -39,15 +40,6 @@ namespace Pinetime {
const FONT_INFO smallFont {lCD_14ptFontInfo.height, lCD_14ptFontInfo.startChar, lCD_14ptFontInfo.endChar, lCD_14ptFontInfo.spacePixels, lCD_14ptFontInfo.charInfo, lCD_14ptFontInfo.data};
void Refresh();
- static const char* MonthToString(Pinetime::Controllers::DateTime::Months month);
- static const char* DayOfWeekToString(Pinetime::Controllers::DateTime::Days dayOfWeek);
-
- char currentChar[4];
- uint16_t currentYear = 1970;
- Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown;
- Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown;
- uint8_t currentDay = 0;
-
States state = States::Running;
void RunningState();
void IdleState();
@@ -59,14 +51,14 @@ namespace Pinetime {
Pinetime::Controllers::Battery &batteryController;
Pinetime::Controllers::Ble &bleController;
Pinetime::Controllers::DateTime& dateTimeController;
- bool bleConnectionUpdated = false;
- bool batteryLevelUpdated = false;
-
- static char const *DaysString[];
- static char const *MonthsString[];
Pinetime::Drivers::Cst816S touchPanel;
void OnTouchEvent();
+
+ Screens::Clock clockScreen;
+ Screens::Screen* currentScreen = nullptr;
+// Screens::Message messageScreen;
+// bool screenState = false;
};
}
}