Remove test code
This commit is contained in:
parent
640e8cd1fe
commit
6491a7c3a0
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(pinetime VERSION 0.2.99 LANGUAGES C CXX ASM)
|
project(pinetime VERSION 0.2.1 LANGUAGES C CXX ASM)
|
||||||
|
|
||||||
set(NRF_TARGET "nrf52")
|
set(NRF_TARGET "nrf52")
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@ DisplayApp::DisplayApp(Pinetime::Drivers::St7789& lcd,
|
||||||
batteryController{batteryController},
|
batteryController{batteryController},
|
||||||
bleController{bleController},
|
bleController{bleController},
|
||||||
dateTimeController{dateTimeController},
|
dateTimeController{dateTimeController},
|
||||||
clockScreen{gfx},
|
clockScreen{gfx} {
|
||||||
messageScreen{gfx} {
|
|
||||||
msgQueue = xQueueCreate(queueSize, itemSize);
|
msgQueue = xQueueCreate(queueSize, itemSize);
|
||||||
currentScreen = &clockScreen;
|
currentScreen = &clockScreen;
|
||||||
}
|
}
|
||||||
|
@ -61,25 +60,6 @@ uint32_t acc = 0;
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
bool toggle = true;
|
bool toggle = true;
|
||||||
void DisplayApp::Refresh() {
|
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;
|
TickType_t queueTimeout;
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case States::Idle:
|
case States::Idle:
|
||||||
|
@ -130,29 +110,16 @@ void DisplayApp::Refresh() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayApp::RunningState() {
|
void DisplayApp::RunningState() {
|
||||||
clockScreen.SetCurrentDateTime(dateTimeController.CurrentDateTime());
|
clockScreen.SetCurrentDateTime(dateTimeController.CurrentDateTime());
|
||||||
|
|
||||||
// if(currentScreen != nullptr) {
|
|
||||||
// currentScreen->Refresh(false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
if(currentScreen != nullptr) {
|
if(currentScreen != nullptr) {
|
||||||
currentScreen->Refresh(true);
|
currentScreen->Refresh(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(screenState) {
|
|
||||||
currentScreen = &clockScreen;
|
|
||||||
} else {
|
|
||||||
currentScreen = &messageScreen;
|
|
||||||
}
|
|
||||||
screenState = !screenState;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DisplayApp::IdleState() {
|
void DisplayApp::IdleState() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,6 @@ namespace Pinetime {
|
||||||
|
|
||||||
Screens::Clock clockScreen;
|
Screens::Clock clockScreen;
|
||||||
Screens::Screen* currentScreen = nullptr;
|
Screens::Screen* currentScreen = nullptr;
|
||||||
Screens::Message messageScreen;
|
|
||||||
bool screenState = false;
|
|
||||||
static constexpr uint8_t pinLcdBacklight1 = 14;
|
static constexpr uint8_t pinLcdBacklight1 = 14;
|
||||||
static constexpr uint8_t pinLcdBacklight2 = 22;
|
static constexpr uint8_t pinLcdBacklight2 = 22;
|
||||||
static constexpr uint8_t pinLcdBacklight3 = 23;
|
static constexpr uint8_t pinLcdBacklight3 = 23;
|
||||||
|
|
|
@ -8452,15 +8452,15 @@
|
||||||
// <e> NRF_LOG_ENABLED - nrf_log - Logger
|
// <e> NRF_LOG_ENABLED - nrf_log - Logger
|
||||||
//==========================================================
|
//==========================================================
|
||||||
#ifndef NRF_LOG_ENABLED
|
#ifndef NRF_LOG_ENABLED
|
||||||
#define NRF_LOG_ENABLED 1
|
#define NRF_LOG_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
|
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
|
||||||
#define NRF_LOG_BACKEND_RTT_ENABLED 1
|
#define NRF_LOG_BACKEND_RTT_ENABLED 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT
|
#ifndef NRF_LOG_BACKEND_SERIAL_USES_RTT
|
||||||
#define NRF_LOG_BACKEND_SERIAL_USES_RTT 1
|
#define NRF_LOG_BACKEND_SERIAL_USES_RTT 0
|
||||||
#endif
|
#endif
|
||||||
// <h> Log message pool - Configuration of log message pool
|
// <h> Log message pool - Configuration of log message pool
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue