Author: Jean-François Milants <jf@codingfield.com>
Application selection at build time Fix DisplayAppRecovery so it builds with -std=c++20.
src/components/gfx/Gfx.cpp | 4 ++-- src/displayapp/DisplayAppRecovery.cpp | 9 +++++++++ src/displayapp/DisplayAppRecovery.h | 7 +++++++
diff --git a/src/components/gfx/Gfx.cpp b/src/components/gfx/Gfx.cpp index 3eaaa3fecc1a5c709acdeb799dfe439cc4906f6d..d3ef3d087ac0f0a74b81bfad142a8a2ee5aeb345 100644 --- a/src/components/gfx/Gfx.cpp +++ b/src/components/gfx/Gfx.cpp @@ -141,7 +141,7 @@ bool Gfx::GetNextBuffer(uint8_t** data, size_t& size) { if (!state.busy) return false; - state.remainingIterations--; + state.remainingIterations = state.remainingIterations-1; if (state.remainingIterations == 0) { state.busy = false; NotifyEndOfTransfer(state.taskToNotify); @@ -170,7 +170,7 @@ *data = reinterpret_cast(buffer); size = bytes_in_line * 8 * 2; } - state.currentIteration++; + state.currentIteration = state.currentIteration + 1; return true; } diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp index de165c2922b48d5acbc19bb5b794f2607371dbcb..9fe59c40a886c83429d8a18451333ed8ecd2272c 100644 --- a/src/displayapp/DisplayAppRecovery.cpp +++ b/src/displayapp/DisplayAppRecovery.cpp @@ -121,3 +121,12 @@ } void DisplayApp::Register(Pinetime::System::SystemTask* /*systemTask*/) { } + +void DisplayApp::Register(Pinetime::Controllers::WeatherService* /*weatherService*/) { +} + +void DisplayApp::Register(Pinetime::Controllers::MusicService* /*musicService*/) { +} + +void DisplayApp::Register(Pinetime::Controllers::NavigationService* /*NavigationService*/) { +} diff --git a/src/displayapp/DisplayAppRecovery.h b/src/displayapp/DisplayAppRecovery.h index 3ce9518773f083a409ea7c604e79f1c9420aa068..a42d3e2fb1f363b25a7c6bb1c08fb46cd9d83add 100644 --- a/src/displayapp/DisplayAppRecovery.h +++ b/src/displayapp/DisplayAppRecovery.h @@ -34,6 +34,9 @@ class MotorController; class AlarmController; class BrightnessController; class FS; + class WeatherService; + class MusicService; + class NavigationService; } namespace System { @@ -66,6 +69,10 @@ }; void PushMessage(Pinetime::Applications::Display::Messages msg); void Register(Pinetime::System::SystemTask* systemTask); + void Register(Pinetime::Controllers::WeatherService* weatherService); + void Register(Pinetime::Controllers::MusicService* musicService); + void Register(Pinetime::Controllers::NavigationService* NavigationService); + private: TaskHandle_t taskHandle;