File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ class BraccioClass
160160 void digitalWrite (int pin, uint8_t value);
161161
162162 // default display APIs
163- void splashScreen ( int duration = 2000 );
163+ void lvgl_splashScreen ( unsigned long const duration_ms );
164164 void defaultMenu ();
165165
166166 void setID (int id) {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ bool BraccioClass::begin(voidFuncPtr customMenu) {
125125
126126 _display_thread.start (mbed::callback (this , &BraccioClass::display_thread));
127127
128- splashScreen ( );
128+ lvgl_splashScreen ( 2000 );
129129
130130 {
131131 lv_style_set_text_font (&_lv_style, &lv_font_montserrat_48);
@@ -219,15 +219,15 @@ void BraccioClass::display_thread()
219219
220220#include < extra/libs/gif/lv_gif.h>
221221
222- void BraccioClass::splashScreen (int duration) {
222+ void BraccioClass::lvgl_splashScreen (unsigned long const duration_ms)
223+ {
223224 LV_IMG_DECLARE (img_bulb_gif);
224225 lv_obj_t * img = lv_gif_create (lv_scr_act ());
225226 lv_gif_set_src (img, &img_bulb_gif);
226227 lv_obj_align (img, LV_ALIGN_CENTER, 0 , 0 );
227228
228229 /* Wait until the splash screen duration is over. */
229- for (long start = millis (); millis () - start < duration;)
230- delay (10 );
230+ for (unsigned long const start = millis (); millis () - start < duration_ms; delay (10 )) { }
231231
232232 lv_obj_del (img);
233233 lv_obj_clean (lv_scr_act ());
You can’t perform that action at this time.
0 commit comments