Skip to content

Commit cec317a

Browse files
committed
Replace 'while(1)' with 'for(;;)' which more expressively says 'infinite loop here'.
1 parent c52923d commit cec317a

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/Braccio.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,13 @@ void BraccioClass::pd_thread() {
196196
}
197197
}
198198

199-
void BraccioClass::display_thread() {
200-
while (1) {
201-
/*
202-
if ((braccio::encoder.menu_running) && (braccio::encoder.menu_interrupt)) {
203-
braccio::encoder.menu_interrupt = false;
204-
braccio::nav.doInput();
205-
braccio::nav.doOutput();
206-
}
207-
yield();
208-
*/
199+
void BraccioClass::display_thread()
200+
{
201+
for(;;)
202+
{
209203
lv_task_handler();
210204
lv_tick_inc(LV_DISP_DEF_REFR_PERIOD);
211-
delay(30);
205+
delay(LV_DISP_DEF_REFR_PERIOD);
212206
}
213207
}
214208

0 commit comments

Comments
 (0)