diff options
| author | JF <jf@codingfield.com> | 2021-03-07 20:29:59 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2021-03-07 20:29:59 (GMT) |
| commit | 5cd4b36d6bbf22095e0ff54aa3773febc6e1f22e (patch) | |
| tree | eac51e42451d827c30fd6572b377c5bbf03f0e24 /src/main.cpp | |
| parent | b89c92b71d82b4e3bf612519a5cf9b2f12886168 (diff) | |
| parent | e63596b291f973cdeb01cd0ac276861895bd4489 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index fe177d0..03cb168 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); } } |
