Skip to content

Commit

Permalink
Make the FrameCallback a std::function to make lambdas easier
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett authored Jun 24, 2024
1 parent 2b40aff commit 71e45be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OLEDDisplayUi.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "OLEDDisplay.h"
#include <vector>
#include <algorithm>
#include <functional>

//#define DEBUG_OLEDDISPLAYUI(...) Serial.printf( __VA_ARGS__ )

Expand Down Expand Up @@ -118,7 +119,7 @@ struct LoadingStage {
void (*callback)();
};

typedef void (*FrameCallback)(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y);
typedef std::function<void(OLEDDisplay *display, OLEDDisplayUiState* state, int16_t x, int16_t y)> FrameCallback;
typedef void (*OverlayCallback)(OLEDDisplay *display, OLEDDisplayUiState* state);
typedef void (*LoadingDrawFunction)(OLEDDisplay *display, LoadingStage* stage, uint8_t progress);
typedef void (*FrameNotificationCallback)(uint32_t FrameNumber, void* UI);
Expand Down

0 comments on commit 71e45be

Please sign in to comment.