mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Replace do while loop with while loop
This commit is contained in:
parent
d8f6cf31ca
commit
72b58ede12
@ -32,9 +32,8 @@ IRAM_ATTR void consoleLoop()
|
|||||||
{
|
{
|
||||||
if(!consoleInputEnabled) return;
|
if(!consoleInputEnabled) return;
|
||||||
|
|
||||||
int16_t keypress;
|
while(int16_t keypress = debugConsole.readKey()) {
|
||||||
do {
|
switch(keypress) {
|
||||||
switch(keypress = debugConsole.readKey()) {
|
|
||||||
|
|
||||||
case ConsoleInput::KEY_PAGE_UP:
|
case ConsoleInput::KEY_PAGE_UP:
|
||||||
dispatch_page_next(LV_SCR_LOAD_ANIM_NONE);
|
dispatch_page_next(LV_SCR_LOAD_ANIM_NONE);
|
||||||
@ -48,7 +47,7 @@ IRAM_ATTR void consoleLoop()
|
|||||||
dispatch_set_page(keypress - ConsoleInput::KEY_FN, LV_SCR_LOAD_ANIM_NONE);
|
dispatch_set_page(keypress - ConsoleInput::KEY_FN, LV_SCR_LOAD_ANIM_NONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while(keypress != 0);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HASP_USE_CONFIG > 0
|
#if HASP_USE_CONFIG > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user