Skip pv screen if no generation

This commit is contained in:
Carsten Schmiemann 2022-11-09 00:08:53 +01:00
parent 091fe5c926
commit 70d53bb2af

View file

@ -500,7 +500,15 @@ void loop() {
lastScreenChangeTime += DISPLAY_SCREEN_INTERVAL;
if (display_screen == display_last_screen + 1)
{
display_screen = 0;
//If no pv power generated, skip PV charger screen
if (pv_kwh == 0)
{
display_screen = 1;
}
else
{
display_screen = 0;
}
}
}
}
@ -512,7 +520,15 @@ void loop() {
display_screen++;
if (display_screen == display_last_screen + 1)
{
display_screen = 0;
//If no pv power generated, skip PV charger screen
if (pv_kwh == 0)
{
display_screen = 1;
}
else
{
display_screen = 0;
}
}
lastButtonRotationState = currentButtonRotationState;
}