Skip to content
Merged
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: 3 additions & 3 deletions OLEDDisplayUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ void OLEDDisplayUi::setAutoTransitionBackwards(){
this->lastTransitionDirection = -1;
}
void OLEDDisplayUi::setTimePerFrame(uint16_t time){
this->ticksPerFrame = (int) ( (float) time / (float) updateInterval);
this->ticksPerFrame = (uint16_t) ( (float) time / (float) updateInterval);
}
void OLEDDisplayUi::setTimePerTransition(uint16_t time){
this->ticksPerTransition = (int) ( (float) time / (float) updateInterval);
this->ticksPerTransition = (uint16_t) ( (float) time / (float) updateInterval);
}

// -/------ Customize indicator position and style -------\-
Expand Down Expand Up @@ -190,7 +190,7 @@ OLEDDisplayUiState* OLEDDisplayUi::getUiState(){


int8_t OLEDDisplayUi::update(){
long frameStart = millis();
unsigned long frameStart = millis();
int8_t timeBudget = this->updateInterval - (frameStart - this->state.lastUpdate);
if ( timeBudget <= 0) {
// Implement frame skipping to ensure time budget is keept
Expand Down