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