fix screen not re-rendering on screen cycle
This commit is contained in:
parent
245ff37fbb
commit
8a001a4697
1 changed files with 4 additions and 4 deletions
6
main.ino
6
main.ino
|
@ -20,8 +20,8 @@ Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST); // Set HW SPI pi
|
||||||
|
|
||||||
const int buttonPin = 16;
|
const int buttonPin = 16;
|
||||||
|
|
||||||
const int AMOUNT_DATAPOINTS = 120; // ~120 max on Arduino Nano (2kB SRAM)
|
const int AMOUNT_DATAPOINTS = 30; // ~120 max on Arduino Nano (2kB SRAM)
|
||||||
const float WAIT_TIME = 0.5;
|
const float WAIT_TIME = 60;
|
||||||
|
|
||||||
class DataStorage {
|
class DataStorage {
|
||||||
private:
|
private:
|
||||||
|
@ -336,7 +336,7 @@ void loop() {
|
||||||
}
|
}
|
||||||
if (digitalRead(buttonPin)){
|
if (digitalRead(buttonPin)){
|
||||||
if (!buttonPressedLastCycle){
|
if (!buttonPressedLastCycle){
|
||||||
currentScreen = config->cycleScreen();
|
config->cycleScreen()->draw();
|
||||||
buttonPressedLastCycle = true;
|
buttonPressedLastCycle = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue