Merge pull request #350 from Avamander/patch-3
Added braces to a few if statements
This commit is contained in:
commit
48018fc1d8
3 changed files with 9 additions and 5 deletions
|
@ -73,9 +73,10 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayApp::Start() {
|
void DisplayApp::Start() {
|
||||||
if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 800, this, 0, &taskHandle))
|
if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 800, this, 0, &taskHandle)) {
|
||||||
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
|
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DisplayApp::Process(void* instance) {
|
void DisplayApp::Process(void* instance) {
|
||||||
auto* app = static_cast<DisplayApp*>(instance);
|
auto* app = static_cast<DisplayApp*>(instance);
|
||||||
|
@ -349,8 +350,9 @@ TouchEvents DisplayApp::OnTouchEvent() {
|
||||||
if (info.isTouch) {
|
if (info.isTouch) {
|
||||||
switch (info.gesture) {
|
switch (info.gesture) {
|
||||||
case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
|
case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
|
||||||
if (touchMode == TouchModes::Gestures)
|
if (touchMode == TouchModes::Gestures) {
|
||||||
lvgl.SetNewTapEvent(info.x, info.y);
|
lvgl.SetNewTapEvent(info.x, info.y);
|
||||||
|
}
|
||||||
return TouchEvents::Tap;
|
return TouchEvents::Tap;
|
||||||
case Pinetime::Drivers::Cst816S::Gestures::LongPress:
|
case Pinetime::Drivers::Cst816S::Gestures::LongPress:
|
||||||
return TouchEvents::LongTap;
|
return TouchEvents::LongTap;
|
||||||
|
|
|
@ -51,10 +51,11 @@ void DisplayApp::Refresh() {
|
||||||
if (xQueueReceive(msgQueue, &msg, 200)) {
|
if (xQueueReceive(msgQueue, &msg, 200)) {
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case Display::Messages::UpdateBleConnection:
|
case Display::Messages::UpdateBleConnection:
|
||||||
if (bleController.IsConnected())
|
if (bleController.IsConnected()) {
|
||||||
DisplayLogo(colorBlue);
|
DisplayLogo(colorBlue);
|
||||||
else
|
} else {
|
||||||
DisplayLogo(colorWhite);
|
DisplayLogo(colorWhite);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Display::Messages::BleFirmwareUpdateStarted:
|
case Display::Messages::BleFirmwareUpdateStarted:
|
||||||
DisplayLogo(colorGreen);
|
DisplayLogo(colorGreen);
|
||||||
|
|
|
@ -12,9 +12,10 @@ void NrfLogger::Init() {
|
||||||
|
|
||||||
NRF_LOG_DEFAULT_BACKENDS_INIT();
|
NRF_LOG_DEFAULT_BACKENDS_INIT();
|
||||||
|
|
||||||
if (pdPASS != xTaskCreate(NrfLogger::Process, "LOGGER", 200, this, 0, &m_logger_thread))
|
if (pdPASS != xTaskCreate(NrfLogger::Process, "LOGGER", 200, this, 0, &m_logger_thread)) {
|
||||||
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
|
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void NrfLogger::Process(void*) {
|
void NrfLogger::Process(void*) {
|
||||||
NRF_LOG_INFO("Logger task started!");
|
NRF_LOG_INFO("Logger task started!");
|
||||||
|
|
Loading…
Reference in a new issue