summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index fe177d0d..03cb1687 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -32,8 +32,6 @@
#include "components/ble/NotificationManager.h"
#include "components/motor/MotorController.h"
#include "components/datetime/DateTimeController.h"
-#include "displayapp/DisplayApp.h"
-#include "displayapp/LittleVgl.h"
#include "drivers/Spi.h"
#include "drivers/SpiMaster.h"
#include "drivers/SpiNorFlash.h"
@@ -85,7 +83,18 @@ Pinetime::Drivers::TwiMaster twiMaster{Pinetime::Drivers::TwiMaster::Modules::TW
Pinetime::Drivers::TwiMaster::Parameters {
MaxTwiFrequencyWithoutHardwareBug, pinTwiSda, pinTwiScl}};
Pinetime::Drivers::Cst816S touchPanel {twiMaster, touchPanelTwiAddress};
+#ifdef PINETIME_IS_RECOVERY
+static constexpr bool isFactory = true;
+#include "displayapp/DummyLittleVgl.h"
+#include "displayapp/DisplayAppRecovery.h"
+Pinetime::Components::LittleVgl lvgl {lcd, touchPanel};
+#else
+static constexpr bool isFactory = false;
+#include "displayapp/LittleVgl.h"
+#include "displayapp/DisplayApp.h"
Pinetime::Components::LittleVgl lvgl {lcd, touchPanel};
+#endif
+
Pinetime::Drivers::Hrs3300 heartRateSensor {twiMaster, heartRateSensorTwiAddress};
@@ -114,7 +123,8 @@ void nrfx_gpiote_evt_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action
extern "C" {
void vApplicationIdleHook(void) {
- lv_tick_inc(1);
+ if(!isFactory)
+ lv_tick_inc(1);
}
}