diff options
| author | JF002 <JF002@users.noreply.github.com> | 2020-10-11 15:05:01 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-11 15:05:01 (GMT) |
| commit | da73938f4d3fe04cc116bdb4d4885c5916aacb0e (patch) | |
| tree | 183422265545e6db4e20a7b263a505d3f59f729c /src/systemtask/SystemTask.cpp | |
| parent | bb72712d376685143b57d321c6f967cbbca4c28e (diff) | |
| parent | fd110dabe82f100550a7538c0e3eb3a439c9a7d2 (diff) | |
Merge pull request #82 from Avamander/patch-6
Minor formatting, diagnostic and documentation changes
Diffstat (limited to 'src/systemtask/SystemTask.cpp')
| -rw-r--r-- | src/systemtask/SystemTask.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index c0552d5..3efe21b 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -100,6 +100,9 @@ void SystemTask::Work() { idleTimer = xTimerCreate ("idleTimer", idleTime, pdFALSE, this, IdleTimerCallback); xTimerStart(idleTimer, 0); + // Suppress endless loop diagnostic + #pragma clang diagnostic push + #pragma ide diagnostic ignored "EndlessLoop" while(true) { uint8_t msg; if (xQueueReceive(systemTasksMsgQueue, &msg, isSleeping ? 2500 : 1000)) { @@ -191,6 +194,8 @@ void SystemTask::Work() { if(!nrf_gpio_pin_read(pinButton)) watchdog.Kick(); } + // Clear diagnostic suppression + #pragma clang diagnostic pop } void SystemTask::OnButtonPushed() { @@ -231,7 +236,7 @@ void SystemTask::PushMessage(SystemTask::Messages msg) { xQueueSendFromISR(systemTasksMsgQueue, &msg, &xHigherPriorityTaskWoken); if (xHigherPriorityTaskWoken) { /* Actual macro used here is port specific. */ - // TODO : should I do something here? + // TODO: should I do something here? } } |
