Dynamic graph recorder timer
This commit is contained in:
parent
39d9ffc3a1
commit
49cfd69b17
12
src/main.cpp
12
src/main.cpp
|
@ -725,26 +725,24 @@ void loop() {
|
||||||
//Graph recorder - 1h
|
//Graph recorder - 1h
|
||||||
if (display_conf_graph_present)
|
if (display_conf_graph_present)
|
||||||
{
|
{
|
||||||
if(millis() - lastGraphRecord_1h >= 30000) //temporarily set to half minute
|
if(millis() - lastGraphRecord_1h >= ((1 *60*60*1000 ) / display_graph_buffersize)) //temporarily set to half minute
|
||||||
{
|
{
|
||||||
display_graph_ringbuffer_add(display_graph_ringbuffer_load_1h, grid_p);
|
display_graph_ringbuffer_add(display_graph_ringbuffer_load_1h, grid_p);
|
||||||
if (display_conf_dc_pvcharger_present)
|
if (display_conf_dc_pvcharger_present)
|
||||||
{
|
{
|
||||||
display_graph_ringbuffer_add(display_graph_ringbuffer_pv_1h, pv_w);
|
display_graph_ringbuffer_add(display_graph_ringbuffer_pv_1h, pv_w);
|
||||||
}
|
}
|
||||||
lastGraphRecord_1h += 30000;
|
lastGraphRecord_1h += (1 *60*60*1000 ) / display_graph_buffersize;
|
||||||
Serial.println("Graph ringbuffer 1h - new value added");
|
|
||||||
}
|
}
|
||||||
/*if(millis() - lastGraphRecord_24h >= 864000)
|
if(millis() - lastGraphRecord_24h >= ((24 *60*60*1000 ) / display_graph_buffersize))
|
||||||
{
|
{
|
||||||
display_graph_ringbuffer_add(display_graph_ringbuffer_load_24h, grid_p);
|
display_graph_ringbuffer_add(display_graph_ringbuffer_load_24h, grid_p);
|
||||||
if (display_conf_dc_pvcharger_present)
|
if (display_conf_dc_pvcharger_present)
|
||||||
{
|
{
|
||||||
display_graph_ringbuffer_add(display_graph_ringbuffer_pv_24h, pv_w);
|
display_graph_ringbuffer_add(display_graph_ringbuffer_pv_24h, pv_w);
|
||||||
}
|
}
|
||||||
lastGraphRecord_24h += 864000;
|
lastGraphRecord_24h += (24 *60*60*1000 ) / display_graph_buffersize;
|
||||||
Serial.println("Graph ringbuffer 24h - new value added");
|
}
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Rotate screen if BUTTON_ROTATION is pressed
|
//Rotate screen if BUTTON_ROTATION is pressed
|
||||||
|
|
Loading…
Reference in a new issue