diff options
| author | JF <jf@codingfield.com> | 2020-01-26 14:39:49 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-01-26 14:39:49 (GMT) |
| commit | 6491a7c3a0738d6e6ef3bf57da460f61298d1cd9 (patch) | |
| tree | f720612013c3518b54ecd22ccfc5aef6917d3023 /src | |
| parent | 640e8cd1febc679b976fb26225aec8d462a4c241 (diff) | |
Remove test code
Diffstat (limited to 'src')
| -rw-r--r-- | src/DisplayApp/DisplayApp.cpp | 37 | ||||
| -rw-r--r-- | src/DisplayApp/DisplayApp.h | 2 | ||||
| -rw-r--r-- | src/sdk_config.h | 6 |
3 files changed, 5 insertions, 40 deletions
diff --git a/src/DisplayApp/DisplayApp.cpp b/src/DisplayApp/DisplayApp.cpp index 8795416..ca13942 100644 --- a/src/DisplayApp/DisplayApp.cpp +++ b/src/DisplayApp/DisplayApp.cpp @@ -26,8 +26,7 @@ DisplayApp::DisplayApp(Pinetime::Drivers::St7789& lcd, batteryController{batteryController}, bleController{bleController}, dateTimeController{dateTimeController}, - clockScreen{gfx}, - messageScreen{gfx} { + clockScreen{gfx} { msgQueue = xQueueCreate(queueSize, itemSize); currentScreen = &clockScreen; } @@ -61,25 +60,6 @@ uint32_t acc = 0; uint32_t count = 0; bool toggle = true; void DisplayApp::Refresh() { -#if 0 - uint32_t before = nrf_rtc_counter_get(portNRF_RTC_REG); - if(toggle) { - gfx.FillRectangle(0,0,240,240,0x0000); - } else { - gfx.FillRectangle(0,0,240,240,0xffff); - } - uint32_t after = nrf_rtc_counter_get(portNRF_RTC_REG); - - acc += (after - before); - if((count % 10) == 0) { - NRF_LOG_INFO("DRAW : %d ms", (uint32_t)(acc/10)); - acc = 0; - } - count++; - toggle = !toggle; -#endif - -#if 1 TickType_t queueTimeout; switch (state) { case States::Idle: @@ -130,29 +110,16 @@ void DisplayApp::Refresh() { break; } } -#endif } void DisplayApp::RunningState() { clockScreen.SetCurrentDateTime(dateTimeController.CurrentDateTime()); -// if(currentScreen != nullptr) { -// currentScreen->Refresh(false); -// } - if(currentScreen != nullptr) { - currentScreen->Refresh(true); - } - - if(screenState) { - currentScreen = &clockScreen; - } else { - currentScreen = &messageScreen; + currentScreen->Refresh(false); } - screenState = !screenState; } - void DisplayApp::IdleState() { } diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 0426542..5a5d3ee 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -59,8 +59,6 @@ namespace Pinetime { Screens::Clock clockScreen; Screens::Screen* currentScreen = nullptr; - Screens::Message messageScreen; - bool screenState = false; static constexpr uint8_t pinLcdBacklight1 = 14; static constexpr uint8_t pinLcdBacklight2 = 22; static constexpr uint8_t pinLcdBacklight3 = 23; diff --git a/src/sdk_config.h b/src/sdk_config.h index e74751e..2136320 100644 --- a/src/sdk_config.h +++ b/src/sdk_config.h @@ -8452,15 +8452,15 @@ // <e> NRF_LOG_ENABLED - nrf_log - Logger //========================================================== #ifndef NRF_LOG_ENABLED -#define NRF_LOG_ENABLED 1 +#define NRF_LOG_ENABLED 0 #endif #ifndef NRF_LOG_BACKEND_RTT_ENABLED -#define NRF_LOG_BACKEND_RTT_ENABLED 1 +#define NRF_LOG_BACKEND_RTT_ENABLED 0 #endif #ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT -#define NRF_LOG_BACKEND_SERIAL_USES_RTT 1 +#define NRF_LOG_BACKEND_SERIAL_USES_RTT 0 #endif // <h> Log message pool - Configuration of log message pool |
