add test ringbuffer

This commit is contained in:
Carsten Schmiemann 2022-11-14 00:35:28 +01:00
parent 95a437b34f
commit 1aa5c835cb
1 changed files with 5 additions and 0 deletions

View File

@ -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