From c23472518b4abde759d6550aab708b6b23372bff Mon Sep 17 00:00:00 2001 From: aquazx20 Date: Mon, 1 May 2023 00:20:13 -0600 Subject: [PATCH] Fixed bug causing flickering and excessive refreshing. --- DisplayESP32.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DisplayESP32.ino b/DisplayESP32.ino index 2619e66..d8ee493 100644 --- a/DisplayESP32.ino +++ b/DisplayESP32.ino @@ -571,6 +571,7 @@ class Screen{ //This can be avoided using pointers to the variable to plot in the graph void graphAssignValue(int graphIndex, double value){ this->graph[graphIndex].assignValue(value); + if(this->currentScreen == graphIndex && this->contentType == 1) this->redraw = true; } @@ -641,6 +642,7 @@ class Screen{ this->currentScreen = this->modifier[this->currentScreen].getPreviousScreen(); this->contentType = this->modifier[this->currentScreen].getPreviousContentType(); } + this->redraw = true; } //These methods control the plus and minus button actions @@ -651,6 +653,7 @@ class Screen{ else if(contentType == 2){ this->modifier[currentScreen].increaseValue(); } + this->redraw = true; } void minusAction(){ @@ -660,6 +663,7 @@ class Screen{ else if(contentType == 2){ this->modifier[currentScreen].decreaseValue(); } + this->redraw = true; } };