diff --git a/src/components/gfx/Gfx.cpp b/src/components/gfx/Gfx.cpp index d3ef3d087a..baa6486a4a 100644 --- a/src/components/gfx/Gfx.cpp +++ b/src/components/gfx/Gfx.cpp @@ -141,7 +141,7 @@ void Gfx::SetBackgroundColor(uint16_t color) { bool Gfx::GetNextBuffer(uint8_t** data, size_t& size) { if (!state.busy) return false; - state.remainingIterations = state.remainingIterations-1; + state.remainingIterations = state.remainingIterations - 1; if (state.remainingIterations == 0) { state.busy = false; NotifyEndOfTransfer(state.taskToNotify); diff --git a/src/displayapp/Apps.h b/src/displayapp/Apps.h index d96e6ea721..0dd8157e2d 100644 --- a/src/displayapp/Apps.h +++ b/src/displayapp/Apps.h @@ -40,10 +40,11 @@ namespace Pinetime { Error, Weather }; + template struct AppTraits {}; - template + template struct TypeList { static constexpr size_t Count = sizeof...(As); }; diff --git a/src/displayapp/Controllers.h b/src/displayapp/Controllers.h index a2f8238880..df6b2284b4 100644 --- a/src/displayapp/Controllers.h +++ b/src/displayapp/Controllers.h @@ -1,11 +1,14 @@ #pragma once + namespace Pinetime { namespace Applications { class DisplayApp; } + namespace Components { class LittleVgl; } + namespace Controllers { class Battery; class Ble; @@ -23,9 +26,11 @@ namespace Pinetime { class MusicService; class NavigationService; } + namespace System { class SystemTask; } + namespace Applications { struct AppControllers { const Pinetime::Controllers::Battery& batteryController; diff --git a/src/displayapp/DisplayApp.cpp b/src/displayapp/DisplayApp.cpp index a195361ddb..98be6324a9 100644 --- a/src/displayapp/DisplayApp.cpp +++ b/src/displayapp/DisplayApp.cpp @@ -98,11 +98,24 @@ DisplayApp::DisplayApp(Drivers::St7789& lcd, filesystem {filesystem}, lvgl {lcd, filesystem}, timer(this, TimerCallback), - controllers{ - batteryController, bleController, dateTimeController, notificationManager, heartRateController, - settingsController, motorController, motionController, alarmController, brightnessController, - nullptr, filesystem, timer, nullptr, this, lvgl, nullptr, nullptr} - { + controllers {batteryController, + bleController, + dateTimeController, + notificationManager, + heartRateController, + settingsController, + motorController, + motionController, + alarmController, + brightnessController, + nullptr, + filesystem, + timer, + nullptr, + this, + lvgl, + nullptr, + nullptr} { } void DisplayApp::Start(System::BootErrors error) { @@ -421,8 +434,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio dateTimeController, filesystem, std::move(apps)); - } - break; + } break; case Apps::Clock: currentScreen = std::make_unique(dateTimeController, batteryController, diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index a42d3e2fb1..41aedb1793 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -73,7 +73,6 @@ namespace Pinetime { void Register(Pinetime::Controllers::MusicService* musicService); void Register(Pinetime::Controllers::NavigationService* NavigationService); - private: TaskHandle_t taskHandle; static void Process(void* instance); diff --git a/src/displayapp/UserApps.h b/src/displayapp/UserApps.h index d0165cf9de..0ed9d60294 100644 --- a/src/displayapp/UserApps.h +++ b/src/displayapp/UserApps.h @@ -26,7 +26,7 @@ namespace Pinetime { return {AppTraits::app, AppTraits::icon, &AppTraits::Create}; } - template typename T, Apps ...ts> + template