From 1aa5c835cbbba73b737cdd9311590be937bd145b Mon Sep 17 00:00:00 2001 From: Carsten Schmiemann Date: Mon, 14 Nov 2022 00:35:28 +0100 Subject: [PATCH] add test ringbuffer --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 622bbc5..08fb08e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -173,6 +173,11 @@ void callback(char* topic, byte* message, unsigned int length) { DynamicJsonDocument json(512); deserializeJson(json, messageTemp); grid_p = json["value"]; + + //add to ringbuffer for testing + display_graph_ringbuffer[display_graph_ringbuffer_index] = grid_p; + if (display_graph_ringbuffer_index == 100) + display_graph_ringbuffer_index = 0; } //Inverter - power