From 847c8e16ba0afc7a8ae66835d185eb6bb40108cd Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Sun, 20 Nov 2022 00:51:58 +0100 Subject: [PATCH] Modular ringbuffer and graph display --- src/display.cpp | 5 +++-- src/display.h | 2 +- src/main.cpp | 21 ++++++++++----------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/display.cpp b/src/display.cpp index 94fce65..3773366 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -244,7 +244,7 @@ void display_screen_grid(float grid_power, float consum, float inv_power, float } //Graph last 100 values -void display_screen_graph(float values[100]) +void display_screen_graph(float values[100], char* key, int buffersize) { logPrintD("Display graph..."); display.firstPage(); @@ -263,7 +263,8 @@ void display_screen_graph(float values[100]) display.drawLine(i, 60, i, 62); //marker X } - for (int i = 0; i<126; i++) + //Data display + for (int i = 0; i