diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2022-12-18 19:14:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-18 18:14:36 +0100 |
| commit | afea7ca0d1d670bdee04cfe80a1d8c36efa4fca0 (patch) | |
| tree | f1a4196755f85af4490c44f6b2c8784f9eb48669 /src/displayapp/DisplayApp.cpp | |
| parent | bfedf47d1a8ac6d5df1d0ad4d4071323366d22e8 (diff) | |
Update clang-tidy configuration and fix some warnings (#1474)
Don't enable coding conventions from unrelated projects. Only enable
generic checks.
Diffstat (limited to 'src/displayapp/DisplayApp.cpp')
| -rw-r--r-- | src/displayapp/DisplayApp.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index 108e380d..015bc8de 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -152,7 +152,7 @@ void DisplayApp::Refresh() { } Messages msg; - if (xQueueReceive(msgQueue, &msg, queueTimeout)) { + if (xQueueReceive(msgQueue, &msg, queueTimeout) == pdTRUE) { switch (msg) { case Messages::DimScreen: brightnessController.Set(Controllers::BrightnessController::Levels::Low); @@ -485,10 +485,9 @@ void DisplayApp::LoadApp(Apps app, DisplayApp::FullRefreshDirections direction) void DisplayApp::PushMessage(Messages msg) { if (in_isr()) { - BaseType_t xHigherPriorityTaskWoken; - xHigherPriorityTaskWoken = pdFALSE; + BaseType_t xHigherPriorityTaskWoken = pdFALSE; xQueueSendFromISR(msgQueue, &msg, &xHigherPriorityTaskWoken); - if (xHigherPriorityTaskWoken) { + if (xHigherPriorityTaskWoken == pdTRUE) { portYIELD_FROM_ISR(xHigherPriorityTaskWoken); } } else { @@ -532,8 +531,7 @@ void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) { } void DisplayApp::ApplyBrightness() { auto brightness = settingsController.GetBrightness(); - if(brightness != Controllers::BrightnessController::Levels::Low && - brightness != Controllers::BrightnessController::Levels::Medium && + if (brightness != Controllers::BrightnessController::Levels::Low && brightness != Controllers::BrightnessController::Levels::Medium && brightness != Controllers::BrightnessController::Levels::High) { brightness = Controllers::BrightnessController::Levels::High; } |
