Skip to content

Commit 48018fc

Browse files
authored
Merge pull request #350 from Avamander/patch-3
Added braces to a few if statements
2 parents a0acc0e + e54163b commit 48018fc

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/displayapp/DisplayApp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd,
7373
}
7474

7575
void DisplayApp::Start() {
76-
if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 800, this, 0, &taskHandle))
76+
if (pdPASS != xTaskCreate(DisplayApp::Process, "displayapp", 800, this, 0, &taskHandle)) {
7777
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
78+
}
7879
}
7980

8081
void DisplayApp::Process(void* instance) {
@@ -349,8 +350,9 @@ TouchEvents DisplayApp::OnTouchEvent() {
349350
if (info.isTouch) {
350351
switch (info.gesture) {
351352
case Pinetime::Drivers::Cst816S::Gestures::SingleTap:
352-
if (touchMode == TouchModes::Gestures)
353+
if (touchMode == TouchModes::Gestures) {
353354
lvgl.SetNewTapEvent(info.x, info.y);
355+
}
354356
return TouchEvents::Tap;
355357
case Pinetime::Drivers::Cst816S::Gestures::LongPress:
356358
return TouchEvents::LongTap;

src/displayapp/DisplayAppRecovery.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ void DisplayApp::Refresh() {
5151
if (xQueueReceive(msgQueue, &msg, 200)) {
5252
switch (msg) {
5353
case Display::Messages::UpdateBleConnection:
54-
if (bleController.IsConnected())
54+
if (bleController.IsConnected()) {
5555
DisplayLogo(colorBlue);
56-
else
56+
} else {
5757
DisplayLogo(colorWhite);
58+
}
5859
break;
5960
case Display::Messages::BleFirmwareUpdateStarted:
6061
DisplayLogo(colorGreen);

src/logging/NrfLogger.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ void NrfLogger::Init() {
1212

1313
NRF_LOG_DEFAULT_BACKENDS_INIT();
1414

15-
if (pdPASS != xTaskCreate(NrfLogger::Process, "LOGGER", 200, this, 0, &m_logger_thread))
15+
if (pdPASS != xTaskCreate(NrfLogger::Process, "LOGGER", 200, this, 0, &m_logger_thread)) {
1616
APP_ERROR_HANDLER(NRF_ERROR_NO_MEM);
17+
}
1718
}
1819

1920
void NrfLogger::Process(void*) {

0 commit comments

Comments
 (0)