Skip to content

Commit 204d636

Browse files
authored
Merge pull request #349 from Avamander/patch-2
Switched to booleans for infinite while loops
2 parents 48018fc + 33f965f commit 204d636

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/displayapp/DisplayApp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void DisplayApp::Process(void* instance) {
8686
// Send a dummy notification to unlock the lvgl display driver for the first iteration
8787
xTaskNotifyGive(xTaskGetCurrentTaskHandle());
8888

89-
while (1) {
89+
while (true) {
9090
app->Refresh();
9191
}
9292
}

src/displayapp/DisplayAppRecovery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void DisplayApp::Process(void* instance) {
3737
xTaskNotifyGive(xTaskGetCurrentTaskHandle());
3838

3939
app->InitHw();
40-
while (1) {
40+
while (true) {
4141
app->Refresh();
4242
}
4343
}

src/logging/NrfLogger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void NrfLogger::Process(void*) {
2222
// Suppress endless loop diagnostic
2323
#pragma clang diagnostic push
2424
#pragma ide diagnostic ignored "EndlessLoop"
25-
while (1) {
25+
while (true) {
2626
NRF_LOG_FLUSH();
2727
vTaskDelay(100); // Not good for power consumption, it will wake up every 100ms...
2828
}

0 commit comments

Comments
 (0)