Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/OLEDDisplayUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void OLEDDisplayUi::setFrames(FrameCallback* frameFunctions, uint8_t frameCount)
}

// -/----- Overlays ------\-
void OLEDDisplayUi::setOverlays(OverlayCallback* overlayFunctions, uint8_t overlayCount){
void OLEDDisplayUi::setOverlays(OverlayCallback* overlayFunctions, uint8_t* overlayCount){
this->overlayFunctions = overlayFunctions;
this->overlayCount = overlayCount;
}
Expand Down Expand Up @@ -460,9 +460,7 @@ void OLEDDisplayUi::drawIndicator() {
}

void OLEDDisplayUi::drawOverlays() {
for (uint8_t i=0;i<this->overlayCount;i++){
(this->overlayFunctions[i])(this->display, &this->state);
}
this->overlayFunctions[this->overlayCount[this->state.currentFrame]](this->display, &this->state);
}

uint8_t OLEDDisplayUi::getNextFrameNumber(){
Expand Down
4 changes: 2 additions & 2 deletions src/OLEDDisplayUi.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class OLEDDisplayUi {

// Values for Overlays
OverlayCallback* overlayFunctions;
uint8_t overlayCount;
uint8_t* overlayCount;

// Will the Indicator be drawn
// 3 Not drawn in both frames
Expand Down Expand Up @@ -275,7 +275,7 @@ class OLEDDisplayUi {
/**
* Add overlays drawing functions that are draw independent of the Frames
*/
void setOverlays(OverlayCallback* overlayFunctions, uint8_t overlayCount);
void setOverlays(OverlayCallback *overlayFunctions, uint8_t* overlayCount);


// Loading animation
Expand Down