Author: JF002 <JF002@users.noreply.github.com>
Merge pull request #81 from Avamander/patch-4 Fixed a typo in SystemTask
src/displayapp/screens/Screen.h | 2 +- src/displayapp/screens/Tab.cpp | 4 ++-- src/systemtask/SystemTask.cpp | 8 ++++---- src/systemtask/SystemTask.h | 2 +-
diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h index dbf81a440b5ad761d17215b843adde2b4cedde8b..0a17b4dae3411415845dceb717b9d0592c94ceb5 100644 --- a/src/displayapp/screens/Screen.h +++ b/src/displayapp/screens/Screen.h @@ -9,7 +9,7 @@ class DisplayApp; namespace Screens { class Screen { public: - Screen(DisplayApp* app) : app{app} {} + explicit Screen(DisplayApp* app) : app{app} {} virtual ~Screen() = default; // Return false if the app can be closed, true if it must continue to run diff --git a/src/displayapp/screens/Tab.cpp b/src/displayapp/screens/Tab.cpp index adc32578a76f112230e420e37a6bc89e7d8635e8..44b806c0a6fd9acd460078d8f2e62966e096f73d 100644 --- a/src/displayapp/screens/Tab.cpp +++ b/src/displayapp/screens/Tab.cpp @@ -1,13 +1,13 @@ #include <cstdio> #include <libs/date/includes/date/date.h> -#include <Components/DateTime/DateTimeController.h> +#include "components/datetime/DateTimeController.h" #include <Version.h> #include <libs/lvgl/src/lv_core/lv_obj.h> #include <libs/lvgl/src/lv_font/lv_font.h> #include <libs/lvgl/lvgl.h> #include <libraries/log/nrf_log.h> #include "Tab.h" -#include <DisplayApp/DisplayApp.h> +#include "displayapp/DisplayApp.h" using namespace Pinetime::Applications::Screens; diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 68f8ab53dc2eb7ee94dea5a0e6be67b0621c98ae..c0552d53d81203beb39a0d42ad719623a164d8ef 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -11,7 +11,7 @@ #include#include <host/ble_gap.h> #include <host/util/util.h> #include <drivers/InternalFlash.h> -#include "../main.h" +#include "main.h" #include "components/ble/NimbleController.h" using namespace Pinetime::System; @@ -36,7 +36,7 @@ twiMaster{twiMaster}, touchPanel{touchPanel}, lvgl{lvgl}, batteryController{batteryController}, bleController{bleController}, dateTimeController{dateTimeController}, watchdog{}, watchdogView{watchdog}, notificationManager{notificationManager}, nimbleController(*this, bleController,dateTimeController, notificationManager, batteryController, spiNorFlash) { - systemTaksMsgQueue = xQueueCreate(10, 1); + systemTasksMsgQueue = xQueueCreate(10, 1); } void SystemTask::Start() { @@ -102,7 +102,7 @@ xTimerStart(idleTimer, 0); while(true) { uint8_t msg; - if (xQueueReceive(systemTaksMsgQueue, &msg, isSleeping?2500 : 1000)) { + if (xQueueReceive(systemTasksMsgQueue, &msg, isSleeping ? 2500 : 1000)) { Messages message = static_cast<Messages >(msg); switch(message) { case Messages::GoToRunning: @@ -228,7 +228,7 @@ isGoingToSleep = true; } BaseType_t xHigherPriorityTaskWoken; xHigherPriorityTaskWoken = pdFALSE; - xQueueSendFromISR(systemTaksMsgQueue, &msg, &xHigherPriorityTaskWoken); + xQueueSendFromISR(systemTasksMsgQueue, &msg, &xHigherPriorityTaskWoken); if (xHigherPriorityTaskWoken) { /* Actual macro used here is port specific. */ // TODO : should I do something here? diff --git a/src/systemtask/SystemTask.h b/src/systemtask/SystemTask.h index 1be28e3f485b1bd4a9dd40697b0c33c739623235..6ef0cfbf8a184c2f17a747d28bedeb7892333025 100644 --- a/src/systemtask/SystemTask.h +++ b/src/systemtask/SystemTask.h @@ -54,7 +54,7 @@ Pinetime::Controllers::Battery& batteryController; std::unique_ptr<Pinetime::Applications::DisplayApp> displayApp; Pinetime::Controllers::Ble& bleController; Pinetime::Controllers::DateTime& dateTimeController; - QueueHandle_t systemTaksMsgQueue; + QueueHandle_t systemTasksMsgQueue; std::atomic<bool> isSleeping{false}; std::atomic<bool> isGoingToSleep{false}; std::atomic<bool> isWakingUp{false};