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.
Yeah, I copied the sample switch styles from the Documentation, but other than that, that’s all I have. I’ve attached my code and the V5 Brain display below.
(Sorry for bad quality)
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.
If you’re working on the GUI it might be a good idea for now to use 3.1.6.
Also, maybe @Hotel or @theol0403 can comment on issues upgrading to LVGL 5.3.
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.
edit:
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.
edit 2:
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)
Yeah, I’m fine with that. The inversion workaround works just fine, and I’d rather you guys just spend time decoupling LVGL from the kernel than fixing an issue with an easy workaround.
exactly why the inverted screen changes the timing I’m not sure. I pulled the same code into my VEXcode LVGL project and it’s runs without issue in either case, no delay needed.