Add graph screen and ringbuffer

This commit is contained in:
Carsten Schmiemann 2022-11-14 00:33:44 +01:00
parent e0dea35efe
commit 95a437b34f
2 changed files with 16 additions and 10 deletions

View File

@ -250,13 +250,18 @@ void display_screen_graph(float values[100])
display.firstPage();
do {
display_header((char*)"Graph");
display.drawLine(8, 27, 127, 27);
display.drawLine(8, 10, 8, 27);
display.drawStr(18,53, "0");
display.drawStr(7,28, "500");
display.drawStr(1,10, "100");
display.drawLine(6, 57, 8, 57);
display.drawLine(6, 28, 8, 28);
display.drawLine(6, 53, 8, 53);
display.drawLine(7, 60, 126, 60); //X boarder
display.drawLine(9, 8, 9, 62); //Y boarder
display.drawStr(1,17, "1");
display.drawStr(1,42, "5");
display.drawStr(1,63, "0");
display.drawLine(7, 38, 9, 38); //marker Y 5
display.drawLine(7, 13, 9, 13); //marker Y 1
for (int i = 19; i<120; i += 10)
{
display.drawLine(i, 60, i, 62); //marker X
}
} while ( display.nextPage() );
}

View File

@ -94,7 +94,8 @@ bool display_conf_time_present = false;
bool display_conf_dc_pvcharger_present = false;
bool display_conf_graph_pv_present = false;
bool display_conf_statistics_present = false;
float display_graph_power[100] = { 0 };
float display_graph_ringbuffer[100] = { 0 };
int display_graph_ringbuffer_index = 0;
int display_refresh_counter = 0;
int display_refresh_time;
@ -633,7 +634,7 @@ void loop() {
{
if (display_conf_graph_pv_present)
{
display_screen_graph(display_graph_power);
display_screen_graph(display_graph_ringbuffer);
}
else
{