Skip pv screen if no generation
This commit is contained in:
parent
091fe5c926
commit
70d53bb2af
1 changed files with 18 additions and 2 deletions
20
src/main.cpp
20
src/main.cpp
|
@ -500,7 +500,15 @@ void loop() {
|
||||||
lastScreenChangeTime += DISPLAY_SCREEN_INTERVAL;
|
lastScreenChangeTime += DISPLAY_SCREEN_INTERVAL;
|
||||||
if (display_screen == display_last_screen + 1)
|
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++;
|
display_screen++;
|
||||||
if (display_screen == display_last_screen + 1)
|
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;
|
lastButtonRotationState = currentButtonRotationState;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue