Reworked the way the screen goes in and out from sleep, so checking if the screen is enable or not does not make any sense anymore
This commit is contained in:
parent
511dcbbfd8
commit
71c69e1a16
@ -132,26 +132,16 @@ void loop()
|
|||||||
switch(evt)
|
switch(evt)
|
||||||
{
|
{
|
||||||
case EventHandler::Event::FLASH_BUTTON_PRESS:
|
case EventHandler::Event::FLASH_BUTTON_PRESS:
|
||||||
if(sab.getScreenManager().getEnabled())
|
|
||||||
{
|
|
||||||
sab.getScreenManager().displayNextView();
|
sab.getScreenManager().displayNextView();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.printf("Changing view\nSelected view is : %d\n",sab.getScreenManager().getCurrentViewUID());
|
Serial.printf("Changing view\nSelected view is : %d\n",sab.getScreenManager().getCurrentViewUID());
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
else
|
|
||||||
sab.getScreenManager().wakeUp();
|
|
||||||
break;
|
break;
|
||||||
case EventHandler::Event::FLASH_BUTTON_LONG_PRESS:
|
case EventHandler::Event::FLASH_BUTTON_LONG_PRESS:
|
||||||
if(sab.getScreenManager().getEnabled())
|
|
||||||
{
|
|
||||||
sab.getScreenManager().displayPreviousView();
|
sab.getScreenManager().displayPreviousView();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Serial.printf("Changing view\nSelected view is : %d\n",sab.getScreenManager().getCurrentViewUID());
|
Serial.printf("Changing view\nSelected view is : %d\n",sab.getScreenManager().getCurrentViewUID());
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
else
|
|
||||||
sab.getScreenManager().wakeUp();
|
|
||||||
break;
|
break;
|
||||||
default: //NO_EVENT
|
default: //NO_EVENT
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user