Browse Source

Fixed bug causing flickering and excessive refreshing.

master
parent
commit
c23472518b
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      DisplayESP32.ino

+ 4
- 0
DisplayESP32.ino View File

@ -571,6 +571,7 @@ class Screen{
//This can be avoided using pointers to the variable to plot in the graph //This can be avoided using pointers to the variable to plot in the graph
void graphAssignValue(int graphIndex, double value){ void graphAssignValue(int graphIndex, double value){
this->graph[graphIndex].assignValue(value); this->graph[graphIndex].assignValue(value);
if(this->currentScreen == graphIndex && this->contentType == 1)
this->redraw = true; this->redraw = true;
} }
@ -641,6 +642,7 @@ class Screen{
this->currentScreen = this->modifier[this->currentScreen].getPreviousScreen(); this->currentScreen = this->modifier[this->currentScreen].getPreviousScreen();
this->contentType = this->modifier[this->currentScreen].getPreviousContentType(); this->contentType = this->modifier[this->currentScreen].getPreviousContentType();
} }
this->redraw = true;
} }
//These methods control the plus and minus button actions //These methods control the plus and minus button actions
@ -651,6 +653,7 @@ class Screen{
else if(contentType == 2){ else if(contentType == 2){
this->modifier[currentScreen].increaseValue(); this->modifier[currentScreen].increaseValue();
} }
this->redraw = true;
} }
void minusAction(){ void minusAction(){
@ -660,6 +663,7 @@ class Screen{
else if(contentType == 2){ else if(contentType == 2){
this->modifier[currentScreen].decreaseValue(); this->modifier[currentScreen].decreaseValue();
} }
this->redraw = true;
} }
}; };


Loading…
Cancel
Save