Skip to content

Commit

Permalink
Application selection at build time
Browse files Browse the repository at this point in the history
Fix DisplayAppRecovery so it builds with -std=c++20.
  • Loading branch information
JF002 committed Nov 19, 2023
1 parent 2c9c07c commit 3886ebf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/gfx/Gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 = state.remainingIterations-1;
if (state.remainingIterations == 0) {
state.busy = false;
NotifyEndOfTransfer(state.taskToNotify);
Expand Down Expand Up @@ -170,7 +170,7 @@ bool Gfx::GetNextBuffer(uint8_t** data, size_t& size) {
size = bytes_in_line * 8 * 2;
}

state.currentIteration++;
state.currentIteration = state.currentIteration + 1;

return true;
}
Expand Down
9 changes: 9 additions & 0 deletions src/displayapp/DisplayAppRecovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,12 @@ void DisplayApp::PushMessage(Display::Messages msg) {

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*/) {
}
7 changes: 7 additions & 0 deletions src/displayapp/DisplayAppRecovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ namespace Pinetime {
class AlarmController;
class BrightnessController;
class FS;
class WeatherService;
class MusicService;
class NavigationService;
}

namespace System {
Expand Down Expand Up @@ -66,6 +69,10 @@ namespace Pinetime {

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;
Expand Down

0 comments on commit 3886ebf

Please sign in to comment.