Hi everyone, I’ve been playing around with LVGL recently to make a more robust autonomous selector. Unfortunately, I have run into a few issues.
The first is that the objects that I define do not appear until they are clicked on. As suggested in other threads, I have made sure to add delay statements in my other tasks, but it seems to do no good.
The second is that making any changes to styles has no effect. I can copy styles like lv_style_pretty, but using switchStyle.body.main_color = LV_COLOR_CYAN has no effect. I tried the same with a button object, but the color still did not change.
What should I do? I’m currently using PROS Kernel version 3.2.0, LVGL is version 5.3.0.
Could you post a picture of the screen, someone had an issue with something not showing up and it turned out to be in the wrong position and blended in with the background. Also is that all your code that does stuff with lvgl, because it seems like it should be working.
Can you get the example gui working?
When I get home I’ll create a project for 3.2 etc. My GitHub example is 3.1.6.
In the meantime you can try to strip the code down to just the switch create and the align. I wonder if you need the call back function.
Hmm, that’s a shame. I think I’m just going to use 3.2.0 and hope that the issues get fixed soon. LVGL 5.1.0 doesn’t appear to have image buttons, and those are pretty vital to my program. Guess I’ll just have to make do.
I was able to update my example v5gui to pros 3.20. I only had to fix a typo that was in a LVGL constant to get it to work. The project is pushed to Github at the head of the same link.
I’m taking my dog for a walk now, if I have time I’ll try to replicate your code example.
I created a new project with “prosv5 c new .” Removed all code in existing functions. Added the code in your OP. It works just fine. The only difference I see is that I have my screen inverted. So, I un-inverted it (i.e. selected “normal”). And guess what. I see the same issue. No slider until I touch the screen.
So all of my LVGL test cases run fine with inverted screen. However, with normal screen, more often than not they show a blank until an active object gets touched. Try running in inverted screen mode see what happens.
that is, indeed, incredibly odd. I’m not sure why that would be the case, nor am I sure how I’d even go about debugging it.
I’m tempted to just let the workaround stand on its own, until we can get LVGL decoupled from the kernel, which should make debugging stuff easier (as long as it’s not some weird vexOS interaction issue)